..oO(jsltd)
Quote:
I'm trying to get an image to have a simple rollover effect (change border
colour and px). I've searched in my books and tried many things, but it just
doesn't work. I'm either missing something or its a browser issue ? |
You're missing something.
Quote:
a href="#"><img src="i/png/image.png" width="190" height="56" border="0"
class="image" /></a |
I don't think you need the class 'image'. The 'border' attribute can be
removed as well, it's deprecated. Add an 'alt' attribute instead, it's
required.
If you use the class, then the selector should read
#sidebar .image {...}
Without the class (prefered):
#sidebar img {...}
This can't work. It applies to links _inside_ an image element, which
can't exist. The correct selector would be
#sidebar a .image:hover{...}
or simply
#sidebar img:hover{...}
Problem: It won't work in IE, which only supports :hover on anchors. So
apply the border styles and the :hover to the anchor to make it work in
IE.
HTH
Micha