Jens Brueckmann skrev:

there do exist counters in CSS, see

  http://www.w3.org/TR/CSS2/generate.html#counters

but, as you might have guessed, they are not supported by Internet Explorer.

Yes. I was a bit too short on that one...

As you already observed, list counters are rather content than
presentation, so either CSS or JavaScript are somewhat questionable
for achieving your aim.

So personally, I would either ignore the validation problem or use a
customized DTD.


Next question: How would a custom DTD affect standards-compliance vz. quirks mode. That is a subject that I have no knowledge about.

I totally agree that a custom DTD is *the* best solution, though - provided it will not trigger quirks mode!

I prepared a short example at http://lairx.de/071011/numbering-lists.html

Triggers strict mode in Firefox - what about MSIE, Opera, Safari, etc?

It uses an extended DTD, where the VALUE attribute for the LI element
and the START attribute for the OL element have been added.
Furthermore a CSS example using automatic numbering is provided.


Great stuff. Thanks!

Also: Thanks to everyone else that has replied to my question!

Doing some small experiments I think there might be an additional reason why one should be cautious in setting list-numbers in CSS. It makes it harder to access and/or change those numbers in JavaScript.


Lars Gunther


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to