views:

50

answers:

3

Hi guys, I have images in my gallery. I want to highlight them (for example, white glow), when mouse is over. Could I do it using javascript/css/html for all browsers?

A: 

Would this work for you: http://www.domedia.org/oveklykken/css-rollover-image.php

BassKozz
+1  A: 

There are a lot of jquery solutions to do this. Here is one.

marcgg
Dmitri Farkov
Yes, but you can't have fading effects with html and css :) In the end it's all about what the OP wants to do
marcgg
+3  A: 

The "hover" pseudoclass isn't supported by all browsers on image tags (your alternative would be using Javascript), but if the images are wrapped in an anchor (A tag), you can do something like this in your CSS:

a img.photo { border-color: transparent; border-width: 3px; border-style: solid; }
a:hover img.photo { border-color: #FFFFFF; }

The first CSS rule sets up the size and type of border, the second one changes the color on hover.

richardtallent
+1 for pure CSS
Ben Blank
It's maybe the best solution, thanks.
Ockonal