how to remove blue border around links in IE9?

2019-02-09 01:23发布

问题:

I'm working on this site: http://amberdreams.com

This is a pretty simple site, and I've been using netrenderer.com to make sure that all the pages work in Internet Explorer.

Despite my best efforts, I have not been able to remove the blue border around the facebook and twitter links on the home page for this site when viewing it with Internet Explorer 9.

img {border: none; }
a img {border: 0px; }

I've tried variations of the code above, and it successfully removes the blue border for every version of IE except 9. Any ideas?

回答1:

Try this in your CSS, worked for me.

img {text-decoration: none; border: 0px}


回答2:

Try the following instead in your css:

border-style:none;

That should remove your border issue.



回答3:

I think that should be fine.

You might want to clear your cache and try again...

If not maybe try:

a{border:none}


回答4:

Visibility of the border around links depends on user settings in IE. Set A {text-decoration: none; border: 0px}.

It seems, that your video-object is not loaded in IE.



回答5:

Here is great post on removing outline with separate remark about IE9:

George Langley wrote in to say that IE 9 apparently doesn't allow you to remove the dotted outline around links unless you include this meta tag:

<meta http-equiv="X-UA-Compatible" content="IE=9" />


回答6:

//Add to your CSS

* {-ms-box-sizing:border-box;}
img {outline-style: none;}

//Add to your HTML

<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
</head>


回答7:

in my case the working code (generated by mailchimp and added a rule for 'a') was:

img,a img,a{
    border:0;
    height:auto;
    outline:none;
    text-decoration:none;
}

so it is an assumption of other answers



回答8:

The best way is to add a CSS attribute

a:link, a:visited { text-decoration: none}

If you want to change colors when you hover the mouse, add

a:hover {color: x } // x = the color of your choice