Remove blue border from printed link images in IE8

Go To StackoverFlow.com

4

I've already read through the similar questions on this topic, but none of them address the problem associated with printing.

I have dynamically generated images that are links as well. Using the following CSS, I am able to prevent blue borders from displaying on the link images in Firefox and IE8.

a img { border: 0; }

However, when printing the page from IE8, the blue border persists. I can't find any options in IE8 to prevent this behavior, and I've already taken action via CSS. Does anyone know why this is happening and how to prevent the annoying blue borders from printing?

2012-04-04 17:12
by Justin Skiles
Have you checked the media type for your stylesheet - Shaun Hare 2012-04-04 17:13
OK, I feel really stupid now. I was editing the screen media sheet instead of the printer media sheet. Using the exact CSS from my original question in the printer media worked perfectly - Justin Skiles 2012-04-04 17:18
We all do it sometimes, glad the prompt helpe - Shaun Hare 2012-04-04 17:19
Not a bad question, I forgot that you can even make a separate style sheet for printing - Philip Kirkbride 2012-04-04 17:40


4

Big derp moment for me.

Using:

a img { border: 0; } 

in media="print" sheet worked perfectly.

2012-04-04 17:19
by Justin Skiles


1

have you tried a { outline: none; }

2012-04-04 17:15
by OAC Designs


1

You probably need to reset more than just links, Reset code = http://CSSesta.tk

Below will fix a few other issues if you haven't already dealt with them.

If it's an actual styling border rather than an outline a img { border: 0; } may help though you may need to track down the styling that its causing it (in that scenario)

/**/
a:hover,a:active{
    outline: none;
}
body div:focus{
    outline: none;
}
img{
    outline:none;
}
a:focus{
    outline:none;
}
a::-moz-focus-inner{
    border: 0;
}
2012-04-04 17:33
by Undefined
Ads