Click to See Complete Forum and Search --> : unwanted blue borders around hyperlinked images using CSS


voodoo46
10-11-2005, 04:37 AM
I'm fairly new to web design and have written a site for my companys intranet using CSS and XHTML.

My problem is that I have blue or purple borders around hyperlinked images.

I can get rid of these by using the border property in html:-

<h2><a href="http://www.alfaromeo.com"><img src="Images/alpha1.gif" width="59" height="63" alt="Alpha Romeo" border="0"></a></h2>

BUT this does not validate as strict XHTML.

How do I get rid of them using CSS?

LiLcRaZyFuZzY
10-11-2005, 04:39 AM
yeah, instead of border="0" add style="border: 0;"

LiLcRaZyFuZzY
10-11-2005, 04:40 AM
or in the <head> tags, place
<style type="text/css">
img{
border: 0;
}
</style>

voodoo46
10-11-2005, 05:02 AM
Fantastic, and so infuriatingly simple!

Thank you very much. :)

LiLcRaZyFuZzY
10-11-2005, 05:18 AM
you are welcome