16

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?

Tibi
  • 4,015
  • 8
  • 40
  • 64
  • Possible duplicate of [How switch off image border in IE](http://stackoverflow.com/questions/2958688/how-switch-off-image-border-in-ie) – Amos M. Carpenter Feb 19 '16 at 02:49

5 Answers5

35

Just specify no border for the images:

a > img{
    border: 0;
}
Klaus Byskov Pedersen
  • 117,245
  • 29
  • 183
  • 222
6

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.

devdigital
  • 34,151
  • 9
  • 98
  • 120
3

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

a img {
   border:none; 
}
Carl0s1z
  • 4,683
  • 7
  • 32
  • 47
0

just set the border from all image to 0 px

   img { border: 0px }
Chuck Norris
  • 15,207
  • 15
  • 92
  • 123
Melvin
  • 3,421
  • 2
  • 37
  • 41
-2

Try

a { 
    text-decoration: none; 
    border:0;
    color: #248AC9; 
} 
ParPar
  • 7,355
  • 7
  • 43
  • 56
  • This doesn't work. And painting with white is not a solution... background is a very light gray, not white. – Tibi Feb 12 '12 at 13:53