Im not sure what its called but is it possible to achieve the format of:
1.
1.1
1.2
1.2.1
1.2.2
1.3
I think thats all, thanks!
Im not sure what its called but is it possible to achieve the format of:
1.
1.1
1.2
1.2.1
1.2.2
1.3
I think thats all, thanks!
Several options, in fact, varying in robustness and support:
Or you can turn to CSS counters. This is probably the best option, if it wasn't for Internet Explorer. IE has a long track record of not supporting generated content in CSS. Internet Explorer 8 is currently the only version supporting this.
Counters are "self-nesting", in the sense that resetting a counter in a descendant element or pseudo-element automatically creates a new instance of the counter. This is important for situations like lists in HTML, where elements can be nested inside themselves to arbitrary depth. It would be impossible to define uniquely named counters for each level.
Example(s):
Thus, the following suffices to number nested list items. The result is very similar to that of setting 'display:list-item' and 'list-style: inside' on the LI element:
OL { counter-reset: item } LI { display: block } LI:before { content: counter(item) ". "; counter-increment: item }