Numbering ordered lists

To create numbering as 1., 1.1, 1.1.1 and so on, use the following style:

article ol { 
	counter-reset:section; 
	list-style-type:none; 
	}
article ol li { 
	list-style-type:none; 
	}
article ol li ol { 
	counter-reset:subsection; 
	}
article ol li ol li ol{ 
	counter-reset:subsubsection; 
	}	
article ol li:before{
    counter-increment:section;
    content:counter(section) ". ";
    float: left;
    margin-right: 0.4em;
	}
article ol li ol li:before {
    counter-increment:subsection;
    content:counter(section) "." counter(subsection) " ";
	}
article ol li ol li ol li:before {
    counter-increment:subsubsection;
    content:counter(section) "." counter(subsection) "." counter(subsubsection) "" ;
	}
/*Count footnotes separately*/	
article ol.references { 
	counter-reset:ref; list-style-type:none; 
	}
article ol.references li:before{
    counter-increment:ref;
    content:counter(ref) ". ";
    float: left;
    margin-right: 0.4em;
	}

Output:

  1. Step 1
    1. Substep 1
    2. Substep 2
      1. Subsubstep 1
  2. Step 2



To submit feedback about this documentation, visit our community forum.

Discussions