Tibi
Tibi

Reputation: 3875

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?

Upvotes: 16

Views: 22326

Answers (5)

Carl0s1z
Carl0s1z

Reputation: 4723

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

a img {
   border:none; 
}

Upvotes: 3

Klaus Byskov Pedersen
Klaus Byskov Pedersen

Reputation: 120937

Just specify no border for the images:

a > img{
    border: 0;
}

Upvotes: 35

ParPar
ParPar

Reputation: 7549

Try

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

Upvotes: -2

Melvin
Melvin

Reputation: 3431

just set the border from all image to 0 px

   img { border: 0px }

Upvotes: 0

devdigital
devdigital

Reputation: 34349

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.

Upvotes: 6

Related Questions