counter-reset on splited elements
For now, if a counter is reset on the section, the counter will reset on each page.
The counter reset works correctly on body. But with this, if the we have several following sections, the counter will not be reset to zero at each section.
HTML
<section>
<p>This is the paragraph 1…</p>
<p>This is the paragraph 2…</p>
<p>This is the paragraph 3…</p>
<p>This is the paragraph 4…</p>
<p>This is the paragraph 5…</p>
</section>
CSS
section {
counter-reset: paragraph
}
section p {
counter-increment: paragraph;
}
section p:before {
content : "before " counter(paragraph) ;
}
What you get with this code:
What we want (CORRECT)