CSS counters, who knew?
Not me, I’m embarrassed to say.
After tooling around with CSS for the better part of 10 years now, I feel all but routinely comfortable with basic CSS techniques and have a working familiarity with the solutions to the most common CSS issues out there. But I have to admit I was totally oblivious to the existence of the counter-increment and counter-reset properties in CSS. These properties are supported by Opera but have also always worked in Firefox and will soon be supported in the upcoming Internet Explorer 8.
This is a solution to a problem I have more than once needed to solve, including the need to set and then reset a numerical sequence in different types of lists or to number headings in sequence, that sort of thing.
There’s a great article about automatic numbering of page elements, using CSS counters at the Opera Developer site (via CSS-Tricks, a current fave among CSS sites I follow).
