HTML and CSS Reference
In-Depth Information
Figure 8-19. Use CSS2 counters to automatically number
chapters and sections
The
counters( )
value is most useful when creating nested numbered
lists. Consider these properties:
ol { counter-reset: item }
li:before { counter-increment: item ;
content: counters(item, ".") }
If you nest several
<ol>
elements in your document, each
<li>
includes
all the nested values, separated by periods. This should create the fa-
increases, as we demonstrated much earlier in this chapter (refer to
Fig-
[*]
Surely you've noticed it in this topic!