Image Border Hover

simbob

New Member
I have created a CSS text hover rule for text links which changes colour when you mouse over. I also applied it to images - so the border changes colour as a hover - and it works fine in Firefox & latest IE, but no borders appear (static or hover states) in opera or Safari. Any ideas why or if there is a better way of achieving this.

My site for ref is www.fogi-design.co.uk
 

PixelPusher

Super Moderator
Staff member
I not sure how you have coded it but I would do something like this:

div.imgholder {
styles for div other than the image
}

div.imgholder a {
border:solid 2px #your static color;
}

div.imgholder a:hover {
border:solid 2px #your hover color;
}


<div class="imgholder">
<a href="#"><img src="yoursource.gif" lat=""/></a>
</div>

This works in Safari, Chrome, Opera, FireFox and IE
 
Top