Bug in IE6?

  • Thread starter Thread starter Rubio
  • Start date Start date
R

Rubio

Try the following code:

<ul>
<li>Bullet
<ol>
<li>Number</li>
</ol>
</li>
</ul>


<ul style="list-style: url('someimage.gif');">
<li>Bullet
<ol>
<li>Number</li>
</ol>
</li>
</ul>

In the former list the numbered list is displayed correctly. In the
latter, the bullet image is used instead of a number. Firefox seems to
work the same way, but I don't think it's very consistent.
 
Rubio wrote on 10 Mar 2005 02:17:15 -0800:
Try the following code:

<ul>
<li>Bullet
<ol>
<li>Number</li>
</ol>
</li>
</ul>

<ul style="list-style: url('someimage.gif');">
<li>Bullet
<ol>
<li>Number</li>
</ol>
</li>
</ul>

In the former list the numbered list is displayed correctly. In the
latter, the bullet image is used instead of a number. Firefox seems to
work the same way, but I don't think it's very consistent.

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
 
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.
 
Rubio wrote on 10 Mar 2005 22:47:37 -0800:
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
 
Back
Top