Hello, I am trying to get numberings for some headings, but for some reason it does not work. I am using this css code:
body {
counter-reset: h2counter;
}
h1 {
counter-reset: h2counter;
}
h2:before {
content: counter(h2counter) ".\0000a0\0000a0";
counter-increment: h2counter;
counter-reset: h3counter;
}
h3:before {
content: counter(h2counter) "." counter(h3counter) ".\0000a0\0000a0";
counter-increment: h3counter;
}Unfortunately, it works only on first level, then it looses ability to count properly.
So the results looks like:
T 1.
T 2.
T 2.1
T 2.1.
T 2.0.1
T 3.
It simply reset counters too early. Anyway I was trying the code somewhere else, and code is OK, the problem might be in proper CSS selectors? Could anyone give me a hand? Thanks.