Reputation: 5006
I have an ordered list:
<ol>
<li></li>
<li></li>
<li></li>
</ol>
How do I position numbers in the vertical center of li items?
Currently they are in the top.
Thank you!
Upvotes: 2
Views: 837
Reputation: 125630
Set line-height
to the same value you set height
(50px
in your example):
ol li {
height: 50px;
background:#eee;
border: 1px solid #DFDFDF;
line-height: 50px;
}
See demo: http://jsfiddle.net/HcDFY/1/
Upvotes: 4