View Full Version : image border/link border conflict (css)

08-10-2007, 02:15 AM
I don't want images to have any borders, but I do want links to have a bottom border. I've done this in the past and
img{border:0} has always been sufficient. I'm not sure why, but it's not working now. It seems like the link styles are taking precedence over the img style.

Other pertinent code:

a:link, a:visited {
border-bottom:1px solid #DDDDDD;
a:hover, a:active {
border-bottom:1px solid #646464;

If you want to see it for yourself: freewebs.com/chickenmcflip/colophon.htm (http://freewebs.com/chickenmcflip/colophon.htm)

Thanks in advance.

08-10-2007, 02:53 AM
You need to give a class to the links that have images in them then you can do something like this

a.classname {

08-10-2007, 02:55 AM
I was afraid I was going to have to do that. It just seems like there should be an easier solution.

Thank you, though.

08-10-2007, 02:57 AM
Not with CSS no. You could use JS but that kind of defeats the purpose of CSS. Also not everyone has JS enabled.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum