I have this codepen https://codepen.io/luisguerra/pen/prROqY, I'm trying to center vertically the text inside each item.
The reason I want is that I don't know how many items in the list will I have, and I want them distributed with same height and each one center vertically (all items should only have 1 line) but line-height: 100% doesn't work, thoughts?
.site-content {
height: 400px;
}
.menu {
height: 100%;
width: 100%;
display: flex;
align-items: center;
flex-direction: column;
}
.item {
flex: 1;
}
<div class="site-content">
<div class="menu">
<div class="item">Lorem ipsum</div>
<div class="item">Lorem ipsum</div>
<div class="item">Lorem ipsum</div>
</div>
</div>