I have a convoluted nested ordered list that I need to implement which looks like this:
1. one
2. two
2.1 two.one
2.2 two.two
2.3 two.three
3. three
3.1 three.one
3.2 three.two
a. lower-alpha-a
b. lower-alpha-b
i. lower-numeral-i
ii. lower-numberal-ii
4. four
I have tried this with css counters but I cant get the increment to stop after the first level, it goes all the way through to the last level.
CSS
OL {
counter-reset: item
}
LI {
display: block
}
LI:before {
content: counters(item, ".")" ";
counter-increment: item;
}
HTML
<ol>
<li>one</li>
<li>two
<ol>
<li>two.one</li>
<li>two.two</li>
<li>two.three</li>
</ol>
</li>
<li>three
<ol>
<li>three.one</li>
<li>three.two</li>
<ol type="a">
<li>three.two.one</li>
<li>three.two.two
<ol type="i">
<li>three.two.one</li>
<li>three.two.two</li>
</ol>
</li>
</ol>
</ol>
</li>
<li>four</li>
</ol>
jsfiddle link: http://jsfiddle.net/902fLnt7/2/ Any help would be appreciated