Rubio wrote on 10 Mar 2005 22:47:37 -0800:
>> Styles are inherited by the nested lists. This is not an IE6 bug, it's
>> the way HTML/CSS works. If you want to have the nested <ol> list not use
>> the image from the parent list you need to define it's style to override
>> it.
>
> Dan,
>
> I know styles are inherited. My point is that it's not very
> consistent. If a nested ordered list follows a regular bulleted list,
> the first item is bulleted, the second numbered. If you use an image
> as a bullet, the first item is still bulleted, but the second has now
> changed into bulleted as well. I would think that an ordered list is
> an ordered list, period. In my book, this is a bug.
>
> Also, there's a discrepancy between IE and Firefox. If I use
> "list-style-image: none;" in the second item, Firefox displays it
> correctly, i.e. numbered, IE still displays it as bulleted.
My FireFox shows nothing - no number, no image. The only way I can get it
show the numbering is to add "list-style: decimal".
If you change your example and use list-style-image to define the image in
the ul tag, then it works in IE and Firefox as expected (at least it does on
mine).
<ul style="list-style-image: url('image.gif');">
<li>Bullet</li>
<ol style="list-style-image: none;">
<li>Number</li>
</ol>
I think the problem you were running into was due to using list-style
instead of list-style-image in your example.
Also, if you look at
http://www.w3.org/TR/REC-CSS2/generate.html#lists
you'll see that by default nested lists will inherit from the parent - this
is in the W3C spec, and is not something that the browser authors have
decided to do on their own.
Dan