Jukka K. Korpela wrote:
> It occurred to me that I could number headings in CSS in a simple way, 
> like
>
> h2 { display: list-item;
>       list-style-type: decimal; }
>
> This works nicely on Firefox, but IE (both IE 6 and IE 7) uses strange 
> numbering. It seems to use numbers that reflect the position of the h2 
> element as a child of body, so the first h2 is not numbered "1." if there 
> is anything before it inside the body, and consecutive h2 elements 
> don't get consecutive numbers if there is anything between them.
>
> I'm afraid there is no cure. IE does not support counters, and here its 
> internal counter ticks wrongly. Or is it wrong? How are items supposed to 
> be numbered by default?
>
>   
Hi Jukka,
I never believe things without a testpage 
<http://home.tiscali.nl/developerscorner/css-discuss/test_h2_numbering.htm>. 
;-)
Without a counter setting...

    css2.1 counters and numbering
    <http://www.w3.org/TR/CSS21/generate.html#counters>

...my Firefox2 doesn't give any number except zero.
Opera9.10 is going on with the h2 numbering after other elements.
IE6 is indeed numbering all elements, also the not h2 elements.

Looking to the css2.1 specs, I cannot find a prescriptive or forbidding 
rule for numbering of elements with a { display: list-item; }.

    css2.1 - Lists <http://www.w3.org/TR/CSS21/generate.html#lists>

Then browsers should be free to have an own interpretation. For me: the 
FF numbering seems to be a bug (probably FF is expecting always a 
counter setting), the IE method is not ... the top, and Opera wins.
So I guess the we have to wait until IE is supporting the "counter" 
property; and the only way for the meantime is falling back on some 
DOM-scripting.
Or just a not automated typing of the numbers in the h2's.
Right?

Greetings,
francky

btw: on "IE fails - why?" the 1 and only answer must be "because it is 
IE". ;-)
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to