Hi,
I'm using CSS to make the borders on my images change colour on a hover - and very pretty it is too. Until I use an image with has an ALIGN element in it. Such as;
<a href="#"><img class="image" src="" width="100" height="100" border="0" align="left></a>
I also have CSS specified like so;
.image {border:1px solid #00456f;}
A:hover, A:active {color: #ff2900;}
A:hover .image, A:active .image {border:1px solid #ff2900;}
in this case if I roll-over the colour changes for the top 10% of the border in IE, although it's fine in NS. If I remove the ALIGN it's fine.
However, I can't remove the align, because it's someone elses code that is being generated from a DB and changing it would affect far too many pages.
Any one have a hack or solution that would help this?
Many thanks.
Scott Graham
Border rollover issues using ALIGN
Hi sagraham,
Well it works in Netscape
Sorry I don't have a CSS solution for you but using javascript may help.
<a href="#" >
<img onmouseover="javascript:this.style.borderColor='#ff2900'" onmouseout="javascript:this.style.borderColor='#00456f'" class="image" src="" width="100" height="100" border="0" align="left">
</a>
Border rollover issues using ALIGN
Thanks Tony
I'm still after an elegant CSS solution, but in the meantime the JavaScript will do nicely.
Cheers
Scott
Border rollover issues using ALIGN
hi sagraham,
you could get some ideas in this [url=http://www.csscreator.com/css-node/
i just dont know if it could help but it is my usual observation on the behavior of IE when it comes to hover events.
hope this helps.
--
Border rollover issues using ALIGN
Hi JaGGeR
Thanks for the tip.
Scott