Hi All ,
div img:hover {
outline:2px solid #4d3326;
}
The above code is not working in ie , its working fine in firefox and chrome , may i know what is the problem or any alternative
Thanks
Hi All ,
div img:hover {
outline:2px solid #4d3326;
}
The above code is not working in ie , its working fine in firefox and chrome , may i know what is the problem or any alternative
Thanks
IE6/7 don't support outline
, you can see which browser's support it on quirksmode here: http://www.quirksmode.org/css/contents.html#t26
Further, IE6 doesn't support :hover
on an <img>
either, so it's double-broken there :)
As mentioned in other posts you can't use :hover
for an image in IE, it works only on <a>
tags, nor does it support outline
in versions below 8.
An alternative would be to wrap your image in an anchor.
<a href="#" class="imagehover">
<img src="bg_panel_corners.png" alt="" />
</a>
And then you can use a border on the anchor
.imagehover:hover{border:2px solid #4d3326}
I do realise this may not be ideal. If so you can use javascript to enable :hover
on none <a>
elements, take a look at this article