nested ordered ol lists in html
Posted
by John
on Stack Overflow
See other posts from Stack Overflow
or by John
Published on 2010-04-28T13:42:20Z
Indexed on
2010/04/28
13:43 UTC
Read the original article
Hit count: 453
html
|html-lists
Hi
I have a nested ordered list.
<ol>
<li>first</li>
<li>second
<ol>
<li>second nested first element</li>
<li>second nested secondelement</li>
<li>second nested thirdelement</li>
</ol>
</li>
<li>third</li>
<li>fourth</li>
</ol>
Currently the nested elements start back from 1 again, e.g.
- first
- second
- second nested first element
- second nested second element
- second nested third element
- third
- fourth
What I want is for the second elements to be like this:
- first
second
2.1. second nested first element
2.2. second nested second element
2.3. second nested third element
- third
- fourth
Is there a way of doing this?
Thanks
© Stack Overflow or respective owner