My little project is really coming togeather; your explainations have really helped a lot
So I tried emulate a numbering style that I've seen many times:
H1's = Section x
H2's = Chapter x
Except that the H2 counter doesn't get reset to 1 when the H1 changes, and the H1's continue to Increment:
Section 1
Chapter 1
Chapter 2
Chapter 3
Section 2
Chapter 4
Chapter 5
Chapter 6
It looks so easy. I have the H2's continuing to increment, but the H1 counter remains 'stuck' at 1.
Can anyone see what I'm doing wrong, or not doing right?
Code:
body
{
counter-reset:h1number;
counter-reset:h2number;
}
h1:before
{
counter-increment:h1number;
content:"Section# " counter(h1number) " – ";
}
h2:before
{
counter-increment:h2number;
content:"Chapter# " counter(h2number) " – ";
}
Thanks
Paul