Image Links without borders

admin

Administrator
Staff member
I am using the following HTML to turn my images into links:

<DIV>
<A HREF='http://www.webdeveloper.com/forum/archive/index.php/index.html'><IMG ID='denovomenu' SRC='http://www.webdeveloper.com/forum/archive/index.php/denovo.jpg' ALT='De Novo Homepage'></A>
</DIV>

The problem is that the images I apply this to are surrounded by an ugly rectangle border which I guess is the same as an underline on text hyperlinks.

Any ideas on how to remove this?You can use css by using
<a href=http://www.webdeveloper.com/forum/archive/index.php/"url"><img src="url" style="border:0px solid;"></a>
or standard html
<a href=http://www.webdeveloper.com/forum/archive/index.php/"url"><img src="url" border="0"></a>I used the CSS option as the HTML idea is not valid HTML 4.01 Strict.

Thanks

I have more queries, what about the TARGET attribute for a hyperlink ? It's not strict so how can I get the same results. I want to open a hyperlink in a new windowWell the target along with many other attributes were depreciated, the border is new to me, I didnt know that one was remove too, I just always used css broders because they were more conveiniant for me. To use the target attribute you need to use HTML 4.01 Transitional or Frameset doc type. Something with a loose DTD.You might just want to remove the borders from all your images at once, with this:

<style type="text/css">
img {
border: 0;
}
</style>
 
Back
Top