davygora Posted February 28, 2010 Share Posted February 28, 2010 Hello everyone, after googling around and searching this board too, unfortunately I haven't found anything useful. My question is this: how could I created cascaded lists with corresponding enumerating, like 1. Item 1 2. Item 2 2.1. Subitem 2.1 2.2. Subitem 2.2 2.3. Subitem 2.3 3. Item 3 3.1. Subitem 3.1 3.2. Subitem 3.2 and similar? The naive try <ol> <li> Item 1 </li> <li> Item 2 <ol> <li>Subitem 2.1</li> <li>Subitem 2.2</li> <li>Subitem 2.3</li> </ol> </li> <li> Item 3 <ol> <li>Subitem 3.1</li> <li>Subitem 3.2</li> </ol> </li> </ol> leads to output 1. Item 1 2. Item 2 1. Subitem 2.1 2. Subitem 2.2 3. Subitem 2.3 3. Item 3 1. Subitem 3.1 2. Subitem 3.2 Is it possible to somehow achieve my desired result? Thank you in advance for your help! Link to comment Share on other sites More sharing options...
boen_robot Posted February 28, 2010 Share Posted February 28, 2010 It is possible by the use of CSS counters, but keep in mind that it doesn't work in IE7 and below.See this article for an exampe. Also, keep in mind that it's buggy in Opera, at least up to and including version 10.00. Link to comment Share on other sites More sharing options...
davygora Posted February 28, 2010 Author Share Posted February 28, 2010 It is possible by the use of CSS counters, but keep in mind that it doesn't work in IE7 and below.See this article for an exampe. Also, keep in mind that it's buggy in Opera, at least up to and including version 10.00.Thank you for your reply. As I understand, there are no hacks for IE7 and below, otherwise you would have told me. Is there no other way? Link to comment Share on other sites More sharing options...
boen_robot Posted February 28, 2010 Share Posted February 28, 2010 There are JavaScript libraries that try to hack IE7 and below into supporting these, such as Dean Edwards' IE7 library and the like, but I don't know how/if they support CSS counters, as honestly, I've never used that property, exactly because IE7's usage share is still high, and even though I've already dismissed IE6, I plan to support IE7 for a while longer. Link to comment Share on other sites More sharing options...
davygora Posted March 1, 2010 Author Share Posted March 1, 2010 I see. Well, anyway, thanks for the information! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.