Unwanted Underlines in Image Links (Firefox)

After switching from HTML4 DOCTYPE to XHTML 1.0 I’ve come across a problem with Firefox. Firefox (Opera and Internet Explorer don’t have problems with this) puts the underline under hyper linked images, which I don’t want (and probably neither do you). But from what I’ve read, it’s not actually a problem, it’s FF following the specifications. But it still needs to be solved :).

Example of problem in screenshot:
Unwanted underlines in Firefox image links

Solution

a img
{
float: left;
}

or try this:

a img
{
display:block;
border: none;
float: left;
}

Leave a Reply

Your email address will not be published. Required fields are marked *