PC Review


Reply
 
 
Rubio
Guest
Posts: n/a
 
      10th Mar 2005
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.
 
Reply With Quote
 
 
 
 
Daniel Crichton
Guest
Posts: n/a
 
      10th Mar 2005
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


 
Reply With Quote
 
Rubio
Guest
Posts: n/a
 
      11th Mar 2005
> 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.
 
Reply With Quote
 
Daniel Crichton
Guest
Posts: n/a
 
      11th Mar 2005
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


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off



Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:09 AM.