I have div
with h3
and button
inside of it, and my div
has display:flex;
with justify-content:center;
align-items:center;
and when i insert these propeties, my button
sticks on the right side of the h3
i tried creating div
and putting button
in it, but that just breakes the view
So question is, how do i put button
under h3
? Do i have missing flex
properties?
.tittle-block {
display: flex;
justify-content: center;
align-items: center;
background: url(../img/background.png) 0% no-repeat;
padding: 0;
min-height: 495px;
}
.tittle {
text-align: center;
width: 555px;
color: #fff;
font-size: 42px;
margin: 0;
}
.button {
display: flex;
justify-content: center;
align-items: center;
flex-direction: wrap;
border: 1px solid white;
border-radius: 5px;
background: none;
color: #fff;
font-size: 25px;
}
<div class="tittle-block">
<h3 class="tittle">Text here</h3>
<button type="button" class="button">View more</button>
</div>