January 3, 2009
A Simple HTML Tip – Link to Images Without Annoying Borders
I was working on a site recently and a client wanted an image linked to a feedback form. But everytime I linked an image, it gave a nasty blue border around it! Check below the break for the simple tip!
Below was my (fairly obvious) code:
<a href="http://www.google.com/"><img src="/img/myImage.gif" alt="" /></a>
I spent about ten minutes hitting my head over this one, wondering if I had left some CSS rule slip in my stylesheet. But it came back to me, and all I needed to remember was the Border tag. Duh!
<a href="http://www.google.com/"><img src="/img/myImage.gif" alt="" BORDER="0" /></a>
I felt pretty stupid to have been doing this for so long and have forgotten such a simple thing! Also, you could just edit your CSS code to avoid unnecessary markup:
img {
border: 0;
}
Just remember, the above code would apply for all images linked to that stylesheet!
Hopefully this one will help out some newb out there in the world, or just someone dumb and forgetful like me. Cheers!

Hi there,
everything dynamic and very positively
Thanks
Eremeeff
I’m also offen using next thing:
a img {
border: 0;
}
Моя теория незначительно отличается от описанной автором, кому интересно, могу поделиться своими идеями. Мой email:cs@mospatr.ru, Валерий.