...

View Full Version : Why doesn't a:hover work with images?



Tombo
11-15-2002, 06:00 PM
<style>
<!-- a:hover {color: #FFFFFF;} -->
</style>

Why doesn't this work on links which are images with borders?

Or does it work and I'm not doing it right?

Borgtex
11-15-2002, 06:50 PM
This is rather a css question.

Anyway, you can try with

a:hover img {border: #FFFFFF ....}

valeria_vi
11-15-2002, 08:28 PM
Tombo,
in the piece of code you had shown us, what you are trying to do is color your whole image white, but javascript cannot do that.
your code would have worked, if your link was text. then, the text would have become white.
Borgtex gave you a good suggestion to try.

beetle
11-15-2002, 09:13 PM
valeria_vi,
Acutally, this method DOES work, just not in IE. Try it in Mozilla or a new version of Netscape.

Borgtex's suggestion will accomplish this in IE, however.

a:hover img {
border: 2px solid #FFF;
}

valeria_vi
11-15-2002, 09:28 PM
Originally posted by beetle
valeria_vi,
Acutally, this method DOES work, just not in IE. Try it in Mozilla or a new version of Netscape.
good to know, beetle, although it does not seem logical from looking @ the code. i mean, whenyou don't specify what it is you want colored ... :eek:


Originally posted by beetle
Borgtex's suggestion will accomplish this in IE, however.
a:hover img {
border: 2px solid #FFF;
}
will the same work for mozilla and new ns, then, as well?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum