How can I vertically center the button?
Image of a problem
I started to learn HTML&CSS and I don't know how can I align the button to vertical center of a div in a proper way.
None of text-align:center etc. doesn't work for me.
Second question: How can I make the outer one div same height as a middle-div?
p {
font-family: Roboto, Arial;
margin-top: 0;
margin-bottom: 0;
}
.user {
font-weight: 500;
}
.photo {
width: 46px;
border-radius: 28px;
}
.user-name,
.user-description,
.status {
width: 150px;
}
.avatar,
.middle-div,
.follow {
display: inline-block;
}
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
<div>
<div class="avatar">
<img class="photo" src="av1.jpg">
</div>
<div class="middle-div">
<div>
<div class="user-name">
<p class="user">
oliver
</p>
</div>
<div class="user-description">
<p class="user-desc">
the cat
</p>
</div>
<div class="status">
<p class="status-desc">
Popular
</p>
</div>
</div>
</div>
<div class="follow">
<button class="follow-button">Follow</button>
</div>
</div>