CSS Library: Image CSS: Here
Highlight image hover effect (opacity or borderize)
Author: Dynamic Drive
The first example changes the opacity of any image link when the mouse moves over it using the "hover:" pseudo class of CSS. Note the two different properties used to specify opacity in CSS below. In IE 5.5+, the "filter" property is used (range: 0-100), and in Firefox, "-moz-opacity" (range: 0-1). Both properties are proprietary, and not formally endorsed by the W3C.
Opacity highlight:
The second example demonstrates applying a border to any image link when the mouse moves over it. The last definition (".toggleborder:hover") is added to overcome a IE bug, which causes the effect to not work in that browser if not added.
Border highlight:
The CSS:
Got a question or need help customizing this CSS code? Post it in the CSS Forums. If you have a comment or suggestion instead, post it in the comments section below.
Comment Pages 1 of 6 pages 1 2 3 > Last »
Not sure about what IE 7 will support here though.
.toggleopacity img{
border: 1px solid #ccc;
}
should be this:
.toggleoborder img{
border: 1px solid #ccc;
}
??
Thank You!
Is it only for Firefox? What might be a problem?
Cheers
Mariusz
.toggleopacity img {
filter:alpha(opacity=50);
-moz-opacity:0.5;
opacity:0.5;
}
.toggleopacity:hover img {
filter:alpha(opacity=100);
-moz-opacity:1;
opacity:1;
}
*I recommend the highlight image hover effect opacity.
*I DO NOT recommend the highlight image hover effect borderize.
Poor IE6 only support :hover over anchor
[To: Terry]
Opera 9 should work fine. Could you quote your sample code here?


