Sent by Simon Willison on 9 September 2002 23:11
At 11:52 09/09/2002 -1000, Timothy Martens wrote:
>Is there a way to SWITCH list-style-image on :hover that works in IE5+ &
>Moz?
Unfortunately not - at least not without invalidating your document.
However, you can achieve the same visual effect by applying a background
image to the <a> element and switching that with the :hover pseudo selector.
<ul id="myList">
<li><a href="blah.html">watch this</a>
</ul>
ul#myList {
list-style-type: none;
}
ul#myList a {
margin-left: 10px;
background: url(bullet1.gif) #fff left no-repeat;
}
ul#myList a:hover {
background-image: url(bullet2.gif);
}
I haven't tested the above code but it should have the required effect.
Cheers,
Simon Willison
--
Web Developer, www.incutio.com
Weblog: http://www.bath.ac.uk/~cs1spw/blog/