How to isolate just the numbers in an <ol>Ordered List</ol> in order to style them?
Is there any way to isolate just the numbers that are produced by an ordered list? I want to give these numbers some bottom margin.
Public Comments
- When you create the <li> (which creates the numbered item), add a class to it: <ol> <li>Regular Item</li> <li class='boldy'>Bold Item</li> </ol>
- my way of isolating the marker from the content is by reasoning out that isolating the content from the markers will achieve essentially the same thing. This is a small hack-around (Warning - very dirty and may upset some people who only care about the semantics of the markup) <ol> <li><span>Content</span></li> </ol> li span{ position:relative; /*top/bottom*/ /*Rest of the styling code*/ }
Powered by Yahoo! Answers