Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Internet explorer displaying image links with colored border

I have the following CSS code for links:

a {
    text-decoration: none;
    color: #248AC9;
}

a:hover {
    color: #8DCFF7;
}

The problem is that in Internet Explorer, images have a strange border with the same color as 'color'. How can I fix this, and draw images correctly. The HTML code is simple: <a href="calculator-operators.htm"><img src="img/link.png" /></a>

Screenshot: So, how can I fix this problem?

like image 472
Tibi Avatar asked Feb 12 '12 13:02

Tibi


3 Answers

Just specify no border for the images:

a > img{
    border: 0;
}
like image 73
Klaus Byskov Pedersen Avatar answered Nov 07 '22 16:11

Klaus Byskov Pedersen


Use

img {
   border: 0;
}

I would consider using a reset stylesheet, or a normalising stylesheet to provide consistency in styling across all browsers. This fix is part of those stylesheets.

like image 25
devdigital Avatar answered Nov 07 '22 14:11

devdigital


Its an old post i see, but i thought, why not. There is an other solution by using border:none;:

a img {
   border:none; 
}
like image 24
C Travel Avatar answered Nov 07 '22 14:11

C Travel