I have this HTML that I can not change:
<ol>
<li>Main
<ul>
<li>Secondary A</li>
<li>Secondary B</li>
<li>Secondary C</li>
</ul>
</li>
</ol>
And I'm numbering this list via CSS with:
ol li:before {
content: counter(li);
counter-increment: li;
The result is basically this:
1. Main
2. Secondary A
3. Secondary B
4. Secondary C
But what I intend to only have the counter on the first level of this list of lists. In the background it would look like this:
1. Main
Secondary A
Secondary B
Secondary C
Not changing HTML what is the best way to prevent counting from continuing in the internal lists?
jsFiddle: link
Testing the problem more extensively repair than omitting content: counter(li);
works , which at first does not make much sense to me as I am to omit "content" ...