View Full Version : How to remove Hyperlink formatting on images?

12-28-2007, 02:18 PM
Hey there, just being new to this forum I have a little issue with my current work I hop you can help me with =)

The following:
I use linked Images as Navigation buttons for my website; the problem is that every single 'button' has got a border, just like a hyperlink is underlined.
Looks like this:


The thing that makes me scratch my head is that I got this part in my (external) css style sheet:

a {
color: #6699FF;
font-weight: bold;
text-decoration: none;

a:hover {
color: #3366FF;
font-weight: bold;
text-decoration: none;

I thought that would prevent hyperlinks frm being formatted - doesnt work though. This is my first page I'm coding with CSS and so I'm probably missing something crucial out - I hope you guys can help me out here =)

Thanks in advance!


12-28-2007, 03:22 PM
As you said the images in hyperlinks get borders. However, text decoration is NOT borders. That means you need to specifically get rid of those:

a img {border: none;}

Note that the borders are applied to the images, not the anchors.

12-28-2007, 03:40 PM
Wonderful, cheers mate =)