Click to See Complete Forum and Search --> : Image Links without borders


Rodders
09-16-2003, 06:55 PM
I am using the following HTML to turn my images into links:

<DIV>
<A HREF='index.html'><IMG ID='denovomenu' SRC='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?

PeOfEo
09-16-2003, 06:58 PM
You can use css by using
<a href="url"><img src="url" style="border:0px solid;"></a>
or standard html
<a href="url"><img src="url" border="0"></a>

Rodders
09-16-2003, 07:21 PM
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 window

PeOfEo
09-16-2003, 08:17 PM
Well 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.

pyro
09-16-2003, 11:59 PM
You might just want to remove the borders from all your images at once, with this:

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