Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
128 views

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 ...
Sourabh Kushwah's user avatar
-1 votes
1 answer
145 views

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 ...
Dan Jacobson's user avatar
0 votes
0 answers
105 views

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; /*...
Sergueille's user avatar
0 votes
1 answer
98 views

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 ...
Melanie Hinchey's user avatar
3 votes
1 answer
104 views

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> &...
JackFan's user avatar
  • 39
0 votes
1 answer
49 views

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. ...
Louis's user avatar
  • 1
1 vote
2 answers
2k views

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: ....
Sofiane R's user avatar
  • 132
-2 votes
1 answer
155 views

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 ...
kevgiraultdev's user avatar
0 votes
1 answer
885 views

This problem is not a duplicated of CSS counter-increment is not working for nested div and h3 elements I have a problem using CSS counters when the element on which is applied is inside other ...
decebal's user avatar
  • 1,211
0 votes
1 answer
795 views

Not adding columns to the grid via fill or fit. Incrementing/decrementing the grid-template-columns repeat() integer when <app-panel>s are dynamically added/removed to/from the DOM. Something ...
D7460N's user avatar
  • 29
5 votes
3 answers
1k views

I've recently been trying to automatically number headings for my Notion writing. The usual implementation I found on the Internet is like this: body { counter-reset: chapter; } h1 { counter-...
Godfly666's user avatar
3 votes
2 answers
823 views

I would like to start nested ordered lists with specific numbers while keeping numbering normal (based on the first starting number) for nested list items. Rather than send people down the wrong path ...
Robert J Turner's user avatar
1 vote
4 answers
2k views

I have an ordered list with some li tags in it. I want the The li tags with .sub-item class to be nested li tags. Is there a way I can reset numbering for the li tags having class? The list is as ...
Alvina Lakhani's user avatar
0 votes
1 answer
611 views

Add numbers to the following list using CSS: Counters. I am trying, but I think I am not applying currently. #two li {display: flex;} li::before {counter-increment: all}; <div> <ol> ...
Deadpool's user avatar
  • 8,296
1 vote
1 answer
191 views

I've copy-pasted what seems to be some popular code for automatically numbering headers in HTML (from here) But this seems to fail if my headings are inside divs: example: <!DOCTYPE html> &...
Alex Lenail's user avatar
  • 14.7k
1 vote
0 answers
341 views

I am trying to create two new custom HTML elements step-list and step-item which will work similar to ol and li items and will create an ordered list with any single-digit numbers preceded by a 0. I'm ...
Brandon McConnell's user avatar
0 votes
1 answer
357 views

I am new to CSS animations so I made this little project in which there is a box bouncing and it looks pretty real. I want the text inside the box (at the beginning it is just a 0) to increment by one ...
user avatar
3 votes
0 answers
326 views

Problem summary I'm creating a print stylesheet for a simple html document with id-referenced headers and anchors to reference these headers, like <h1 id="the-document">The Document&...
Dominik Schreiber's user avatar
5 votes
4 answers
2k views

Has the Firefox desktop v84 update broken the CSS counter-reset: functionality? Chrome and Edge render ok but not Firefox Can anybody confirm? Below is a sample of the code that I'm using: body { ...
An Observer's user avatar
2 votes
1 answer
2k views

I am looking for a possible way, solely using CSS that could allow one to increment a CSS counter for every line of text within a DOM element. This question is similar, but not the same as this SO ...
user avatar
1 vote
1 answer
498 views

I ran into a CSS issue which I can't solve of my own. It's easy: The CSS counters work with headings without div, but don't work with headings in a div. Look at the following examples... This works ...
Sr. Schneider's user avatar
5 votes
4 answers
2k views

Demo: https://jsfiddle.net/jacobgoh101/uqrkaodc/3/ <ol> <li>a</li> </ol> <ul> <li>b</li> </ul> <ol> <li>c</li> <li>d<...
Jacob Goh's user avatar
  • 20.9k
0 votes
1 answer
126 views

This is my css for creating counters: #lctndrp li:before{ content: counters(item, ".") " "; counter-increment: item; } This is my html: <ol> <li> ::before one <...
sathish kumar's user avatar
5 votes
1 answer
406 views

I'm trying to use the CSS counter to create Chapter numbers. As you can see in the example below, it's working properly if I deal with classes inside a container, but doesn't work when I try to use it ...
TmZn's user avatar
  • 407
5 votes
2 answers
4k views

Is it possible to pad counter numbers depending on its value? div { counter-reset: ruler; } div > span { display: block; line-height: 1rem; } div > span::before { ...
Monsieur Pierre Doune's user avatar