I'd like to center text vertically.
But, this doesn't work.
I should be able to center text vertically when I place text in inline-block, right?
How come this code doesn't work and how can I make it work!?
Please help me out!
Thank you in advance :)
HTML
<ul class="socialBlock">
<li class="socialBlock__item">tw</li>
<li class="socialBlock__item">fb</li>
<li class="socialBlock__item">g+</li>
</ul>
CSS
.socialBlock {
padding:10px;
background: yellow;
list-style: none;
}
.socialBlock__item {
margin:0;
padding:0;
display: inline-block;
background: green;
height:44px;
vertical-align: middle;
}
Codeopen