Thursday, February 21, 2013

Using Counter for TOC

body
{
counter-reset:section;
}

h1
{
counter-reset:subsection;
}


h1:before
{
counter-increment:section;
content:"Section " counter(section) ". ";
}


h2:before
{
counter-increment:subsection;
content:counter(section) "." counter(subsection) " ";
}


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.