Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

border around image


ghost's Avatar
0 0

i forgot how to get rid of the border that comes around a image when it is also a link. any help:ninja:

(ive already tried looking for my answer at w3schools.com and other sites but having trouble)


ghost's Avatar
0 0

in which language? show us the code?


ghost's Avatar
0 0

You can add this in style.css:

img { border-style: none; }

Or:

<a href="site.com"> <img src="site.com/image.png" style="border-style: none"/> </a>


ghost's Avatar
0 0

in php/css

i dont have the code right now because my server down but it bassicly goes like this

<a href="www.sociophyte.com"> <img src="images/logo.jpg"></a>

this works perfectly but since i made the image a link it automatically puts a border around the image and i cant remember the code to take it off.


ghost's Avatar
0 0

well, I would try: <head> <style> a img { border: 0px; } </style> </head>


ghost's Avatar
0 0

<a href='www.yoursite.com'><img src='bla.jpg' border=0 \></a>


mikispag's Avatar
=> Penguin in black <=
0 0

I think this is the best solution. It is W3C compliant (not deprecated) and compact.

markup&lt;img src=&quot;image.jpg&quot; border=&quot;0&quot; /&gt;

You could also use CSS: it will be convenient if you are including several images and you don't want to repeat the border="0" attribute for every picture.

markupimg {border: 0px;}


ghost's Avatar
0 0

mikispag wrote: I think this is the best solution. It is W3C compliant (not deprecated) and compact.

markup&lt;img src=&quot;image.jpg&quot; border=&quot;0&quot; /&gt;

You could also use CSS: it will be convenient if you are including several images and you don't want to repeat the border="0" attribute for every picture.

markupimg {border: 0px;}

That's been posted many many many times already….was that really necessary?…..:p