Automatic numbering with CSS Counters

Forums » Dev.Opera » Archived Article Discussions

This topic has been closed. No new entries allowed.

Reason: You can now post comments on articles on Dev Opera

Forum rules and guidelines

You need to be logged in to post in the forums. If you do not have an account, please sign up first.

1. October 2008, 10:07:02

Opera Software

dstorey

Posts: 237

Automatic numbering with CSS Counters

In this article David Storey looks at how to use CSS counters to provide robust sequential numbering for reoccuring HTML elements such as list items or paragraphs.

( Read the article )

<q>Knowledge speaks, but wisdom listens.</q> - Jimi Hendrix

David Storey, Chief Web Opener, Product Manager Opera Dragonfly, Opera Software ASA

5. October 2008, 23:21:01

modle

Posts: 2

Pls i cant download wiht my opera 2006 and my opera 3.10 pls help me out on this

5. October 2008, 23:25:02

modle

Posts: 2

Originally posted by modle:

Pls i cant download wiht my opera 2006 and my opera 3.10 pls help me out on this

7. October 2008, 16:33:02

Opera Software

chrismills

Posts: 378

Originally posted by modle:

Pls i cant download wiht my opera 2006 and my opera 3.10 pls help me out on this



Apologies - I'm not sure what you mean. Are you saying that you can't access this page correctly with a certain Opera browser? If you give me some more specific information, I'll be more than happy to do some testing, and look into this issue.
Chris Mills
Developer Relations Manager
Editor, dev.opera.com and labs.opera.com

10. October 2008, 16:25:00

FataL

Opera freak

Posts: 1443

How about this counting example?
Normal rendering in Opera was destroyed by Opera 9 TP 2.
Also works in Safari 3, Chrome 0.2, Firefox 3.1, Internet Explorer 8, iCab 3...
Main browser and mail: 9.27 • Secondary: 10.63 (still has annoying UI regressions: inability to detach tab normally, passes source file w/o extension to external editors)
extendopera.orgReport bugs to public BTS

17. December 2010, 19:15:35

Netsaver

Posts: 1

How much time to see also target-counters and other target-attr features implemented in Opera?
They're the logic complementary functions to the 'counter' features.
At the moment they would be the only possibility (I know) to implement automatic updating of all cross-references, saving a lot of work!
I'm only worried that Opera team is waiting for the W3C recommendations to become a standard!
We should then wait for five years yet!!
Netsaver

4. October 2011, 08:23:42

notabeneorg

Posts: 1

Small typo, I think: In "Displaying the counter" the code ends with:

h2:before  { counter(section) “ “; }


and it should be:

h2:before  { content:counter(section) “ “; }


Thanks for the tutorial anyway, useful as always.

4. October 2011, 17:34:00

c69

Posts: 331

@notabeneorg Yes.

Forums » Dev.Opera » Archived Article Discussions