I have css like this:
.done {list-style-image:url('images/tick.gif')} .notdone {list-style-image:url('images/cross.gif')}
And html like this:
<ul> <li class='done'>Done</li> <li class='notdone'>Not Done</li> </ul>
Works great on IE6 and FF. Each li item has a different image for the bullet. But all of the docs I see on list-style-image says it should be applied to to the ul tag.
Is there a proper or standards-based way of doing what I am trying to do, or is this it?
EDIT: http://www.w3.org/TR/CSS21/generate.html
It looks like it doesn’t say that I CAN’T use list-style-image on an li tag, but the examples don’t show that.
The CSS 2.1 standard gives examples where
list-styleis applied directly to anli.Followed by:
So I would draw the conclusion that it is OK to apply
list-style-typeorlist-style-imageto list items directly, as long as you are careful and understand the cascade of your CSS rule.