Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: incrediBILL
I'm trying as hard as I can to keep/convert a tiny site to xhtml 1.1. Now I've faced the trouble of starting an ordered list with a number different from "1". In hmtl I'd say <ol start="2"> or <li value="2"> but this two attributes are deprecated in xhtml 1.1
Some references in the Web seem to point to some CSS way to do that but I'm clueless about it.
Is there any kind sould that could lend me a helping hand in this?
Thanks in advance
I have no online reference, but here's a direct quote from a publication (my offline reference!):
Q.How do I set the starting values for ordered lists using CSS? A. Unfortunately, you can't set those with CSS. In order to set specific number values for ordered lists, you'll need to use the HTML start attribute on the <ol> element or the value attribute on <li>. Both of these values are deprected in HTML 4.01, which means you can't use them in Strict HTML Documents.
So does this mean they're not available for Strict or Transitional XHTML?
Haven't tried it, so I can't talk about browser support. But in theory, there's the answer.
From W3Schools.com > OL tag [w3schools.com]
However, this same page seems to suggest that 'start' is allowed in XHTML Transitional and Frameset DTDs, so maybe Transitional is the way to go?
I have also seen some of those references to using stylesheets instead, and I too would be interested to find out how this could be done.
content: counters(item, ".");
I notice that support for the :before pseudo element is key to this approach, and that is might scarce right now.
The only support I found so far is in Opera 7, and it doesn't add the period after the number. But it DOES begin numbering the list items at 4 -- as it should when the reset is set to "3".
I also tested in Phoenix and IE6 - nada.
As I worked with this, I could see how valuable it will be, if and when it has support. For instance, you could publish a document online and when you added or removed headings, the numbers for them would automatically reset throughout the page. You wouldn't need to deal with that manually at all.
Yes that's the CSS2 way. Quite a pity that it does not seem to be implemented yet, but the counter possibilities of the CSS2 seem to be extremely powerful for long legal-like numbered documents.
Thanks again, folks. Your kindness made my day :)
PS: I have found (now that I know what I'm looking for) this: [xs4all.nl...]