2

Possible Duplicate:
Removing the image border in Chrome/IE9

There is a border around the image which is wrapped in blue. it is blue in color... I tried to follow a few solutions but the border image doesnt disappear.

CSS:

<style type="text/css">
   a {outline : none;}
   a img {outline : none;}
   img {border : 0;}
   a:active, a:focus 
   { 
     outline: none; 
     ie-dummy: expression(this.hideFocus=true);
    }
</style>

Here is my html markup:

<p style="margin-left: 39%;margin-top: 23px;">
     <a  href="<?php echo $review[0]['link']; ?>" 
         target="_blank" style="border: none;text-decoration: none;">
         <img style="border: none;" 
              src="Images/Review/button_register_for_free.png"/>
     </a>
</p>
Community
  • 1
  • 1
Dmitry Makovetskiyd
  • 6,942
  • 32
  • 100
  • 160

2 Answers2

5

The only rule you should need, notwithstanding any other styles you have, is to set no border on images.

You almost did that with:

img {border : 0;}

But it should be:

img {border : none;}
Fenton
  • 241,084
  • 71
  • 387
  • 401
  • that didnt work...look at the html , in the style attribute – Dmitry Makovetskiyd Aug 13 '12 at 09:02
  • Here is an example in JS Fiddle - you'll see that there is no border around the image: http://jsfiddle.net/Sohnee/5CmRW/ - testing in IE 9.0.8112.16421. If you are still stuck - perhaps you have left out some style rules from your example. Perhaps you could create a JS Fiddle that shows the problem? – Fenton Aug 13 '12 at 09:07
1

Some browsers show a border around images inside a link, which you can remove using:

a img { border: none; }

You might also want to remove the underlining of the link, which would show up looking like a bottom border for the image:

a { text-decoration: none; }
Guffa
  • 687,336
  • 108
  • 737
  • 1,005