Toniq
Toniq

Reputation: 5006

Ordered list number style position

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.

http://jsfiddle.net/xuZEb/6/

Thank you!

Upvotes: 2

Views: 837

Answers (1)

MarcinJuraszek
MarcinJuraszek

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

Related Questions