Web Hosting Talk







View Full Version : a:hover border, but not on images


splatcatballa99
12-17-2007, 09:58 PM
Ok currently for my site a:hover is set to have a border on the bottom, but I don't want this to be true for images.

Heres the css bit

a:link {
text-decoration: none;
color: #474C51;
}
.text_help {
margin-left:11px;
margin-right:10px;
}

a:visited {
color: #474C51;
text-decoration: none
}

a:hover {
color: #474C51;
border-bottom:dotted 1px #000;
text-decoration: none;
}

a:active {
color: #474C51;
border-color: #A4A8AB
}

img {
text-decoration: none;
border-bottom: none;
}

Jay August
12-17-2007, 10:37 PM
a:hover img {border: 0 !important}

should fix that :)

splatcatballa99
12-18-2007, 01:00 AM
a:hover img {border: 0 !important} should fix that :)
Didn't work.

Jay August
12-18-2007, 01:46 AM
drop the ':hover' part so it only says

a img {border: 0 !important;}

Should work mate!

WebDesignGold
12-19-2007, 08:44 AM
You have to create a class and apply it to links that contain images.. for instance:
a.noborder:hover { border-bottom: 0; }
<a href="#" class="noborder"><img src="img.gif" /></a>