161 questions
0 votes
2 answers
128 views
CSS page counters not visible in generated PDF using @page rule
I'm developing a feature to generate a PDF health report from an EJS template. I'm trying to add page numbers (e.g., "Page 1 of 10") to the footer of each page. I'm using the CSS Paged Media ...
-1 votes
1 answer
145 views
How to add index column to HTML <table> using just CSS? [duplicate]
How to add an index column to a HTML <table> using just CSS? Before: ITEM PRICE Banana $2 Orange $1 After: No. ITEM PRICE 1 Banana $2 2 Orange $1 How to add it automatically? I.e., what ...
0 votes
0 answers
105 views
Use multiple counter-reset rules on one element
I have two different CSS files, and I want body to reset two counters: This file is linked before: body { counter-reset: counter-one; } and this one after body { counter-reset: counter-two; /*...
0 votes
1 answer
98 views
Trailing zeros in content: counters function of CSS
I've used the content CSS value with the counters function to create ordered lists that have nested numbering. My html is created using the DITA open toolkit, so there are auto-generated and ...
3 votes
1 answer
104 views
Why are there two different results for the numbering of <dl> tags in Edge and Firefox?
The following snippets produce different results in Edge and Firefox: dd { display: list-item; list-style-position: inside; list-style-type: decimal; counter-increment: 1; } <ul> &...
0 votes
1 answer
49 views
I don't know how to make my <ol> inside <ul> begin with only one number
I'm trying to style lists inside of lists in CSS but there is a problem when I have an ordered list inside an unordered one. I'd like the ordered list which is inside an unorered list to begin at 1. ...
1 vote
2 answers
2k views
Increment Counter in CSS for a list with :before
I tried to increment a counter for a list with CSS. However, even though I can see the list numbers, those don't increment. I used :before and the CSS property counter. Here's the code: ....
-2 votes
1 answer
155 views
At-rule counter-style in pseudo-element does not works
Is it possible to use @counter-style on a pseudo-element? I tried with an ::after, but it does not works, while in direct selector, @counter-style works. Problem with this case: if I want to move the ...