Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

image link without border 1

Status
Not open for further replies.

yahve

Programmer
Nov 14, 2000
159
CA
Hi,

No, this is not that simple. I want to know how to use an image as a link without having a border placed it, without using the border="0" attribute in the img tag. Why? Because there is no border attribute in XHTML1.1 (or XHTML1 strict) for the img tag.

I tried using CSS on the link element without results. Does anyone have an idea?

Thanks.
 
hie
if you are talking about border wich appears when your link recieves focus, may be you should try this:

<a .. onfocus=&quot;blur()&quot;><img ..></a> Victor
 
Have you tried:
<a href=&quot;f.htm&quot;><img src=&quot;f.gif&quot; style=&quot;border=0&quot;></a>
 
Hi,

Thank you both, but this is not what I'm looking for.

Vituz, I'm not talking about the small dotted lines that you're solution hides but about the border which border=&quot;0&quot; would get rid of.

But, as I said, the border attribute does not exist for the img tag in XHTML1.1, so I need another solution.

Thanks.
 
yahve,
sorry, can't help you then.. may be someone else?
good luck! Victor
 
Well,
if you look closely in the my proposed solution,
it is not attribite border, it is CSS inline style.
I believe that as style you can use border (even with XHTML 1.1).
Or if you prefer:
<style type=&quot;text/css&quot;>
.borderless {border:0}
</style>
.......
<a href=&quot;f.htm&quot;><img src=&quot;f.gif&quot; class=&quot;borderless&quot;></a>

Otherwise, success in finding other solution.
D.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top