I have epub file and it include several xhtml files and i want to add counter in the top of these files. i use CSS counter but the counter is still showing same number in all files.
i put these tag in all htmls
<p class="custompagenumber"></p>
and use this css
body {
counter-reset: section; /* Set the section counter to 0 */
}
.custompagenumber::before {
text-align: center;
color: red;
counter-increment: section; /* Increment the section counter*/
content: "(" counter(section) ")"; /* Display the counter */
}