Jump to content

Image link problem


KevinM1

Recommended Posts

you can use the old border="0" attribute in the image tag BUT i prefer to do this..

<a href='the link' id="thislink"><span>SOME TEXT TO SHOW IF CSS IS OFF AND SCREEN READERS CAN SEE</span></a>

in in the css

a#thislink {display:block; width: 200px; height: 100px; background transparent url (images/urimage.gif) no-repeat 0 0}
a#thislink span {display:none;}
Link to comment
https://forums.phpfreaks.com/topic/30255-image-link-problem/#findComment-139325
Share on other sites

[quote author=Nightslyr link=topic=118208.msg483007#msg483007 date=1165879821]
My border: none is quite literally connected to the anchor element.  In other words:
[code]
a{
  border: none;
}
[/code]

But that didn't work.

EDIT: but setting the images' border to 0 did.  Thanks, ToonMariner. :)
[/quote]

With that you are telling your browser to give links no border, what you'll want to do is this:
[code]a img {
    border: none;
}[/code]
This will now tell the browser to give any image within an anchor no borders. Its the image thats got the border not the link.
Link to comment
https://forums.phpfreaks.com/topic/30255-image-link-problem/#findComment-139799
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.