Struggling to center text and buttons using flexbox while keeping the columns equal? Setting column height as 100% can be a challenge. If you set the height to 100%, vertical alignment may no longer be centered. Avoid resorting to tables or JavaScript for a solution.
.container {
display:flex;
border-top: solid 1px;
border-bottom: solid 1px;
align-items: center;
height:48px;
}
.column {
flex-basis:100%;
text-align:center;
}
.mid-col {
border-left:solid 1px;
border-right:solid 1px;
}
<div class="container">
<div class="column">
<div>50</div>
<div>Following</div>
</div>
<div class="column mid-col">
<div>50</div>
<div>Followers</div>
</div>
<div class="column">
<button>Follow</button>
</div>
</div>
JS Fiddle: fiddle