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!

Using picture links and stylesheets 1

Status
Not open for further replies.

cm80

Technical User
May 3, 2001
85
US
Hi,

I have links hidden behind picture on my web page and they were working fine but since I added a stylesheet they don't work anymore.
Here is the line of HTML,

<img src=&quot;../Images/chkout.gif&quot; href=&quot;checkout.html&quot;>

Is there something you need to change here if using stylesheets?

Thanks,
cm80
 
Hi cm80,

I don't think &quot;href&quot; is an attribute of the <img> tag.
Just make a normal link:

<a href=&quot;checkout.html&quot;><img src=&quot;../Images/chkout.gif&quot;></a>

Hope this helps,
Erik <!-- My sport: Boomerang throwing !!
This year I will participate at the World Championships in Germany. (!! Many Happy Returns !! -->
 
Hi Erik,
Thanks for replying so quickly. That works fine and its the way I had it first day but I changed it because it puts a blue outline around the image (the same way as by default a link is underlined and made blue).
Before I added the stylesheet the syntax above worked fine. i don't really understand why it won't work at the moment. Anyway, I'll keep trying! thanks again.
 
To get rid of the blue line put border=&quot;0&quot; in the image tag. As Boomerang says, you can't put href in the image tag so you might be trying for a while.

Cheers,

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top