Welcome to WebmasterWorld Guest from

Forum Moderators: incrediBILL

Message Too Old, No Replies

CSS not being picked up when Printing from IE6

CSS Printing IE6

12:22 am on Dec 11, 2007 (gmt 0)

New User

5+ Year Member

joined:Dec 11, 2007
posts: 3
votes: 0

Hi All,

I've an issue that I can't seem to find any information on despite having googled for a while. The jsp pages on our site displays fine in a variety of browsers including IE6. When I try to print from IE6 however all formatting is lost. The pages print fine from Firefox, Safari etc but not IE6. The odd thing is that if I save one the pages locally as html, then open it up in IE6 and print out, it outputs the page to the printer with the correct CSS. It appears as though the CSS is not being picked up at all when we print from IE6. Our CSS files are declared thus:

<link rel="stylesheet" media="all" type="text/css" href="main.css" />
<link rel="stylesheet" media="all" type="text/css" href="apps.css" />
<!--[if gte IE 6]>
<link rel="stylesheet" media="all" type="text/css" href="ie6.css" />
<link rel="stylesheet" media="print" type="text/css" href="print.css" />

The print.css file overrides some styles in main.css so that it prints ok (at least on browsers other than IE6). It renders fine in all browser windows so I'm at a loss as to why it wouldn't print ok.

Does anyone have any experience of this or know what the cause/solution may be? Thanks in advance for your help.


12:34 am on Dec 11, 2007 (gmt 0)

New User

5+ Year Member

joined:Dec 11, 2007
posts: 3
votes: 0

Doc type is:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

4:02 pm on Dec 11, 2007 (gmt 0)

Junior Member

10+ Year Member

joined:June 1, 2007
votes: 0

Hello pmrco, I believe it is traditional here to say welcome to new members, so welcome to you!

I would try a few different things first to find the bug. try placing the print stylesheet before the one in the conditionel comment. also try changing "all" to "screen" for the general stylesheets.

Also are you saying that the print stylesheet is having no effect at all in IE? If you add it twice (once between the conditional comment) does that help?

Hope that helps find the cause!

8:54 pm on Dec 11, 2007 (gmt 0)

New User

5+ Year Member

joined:Dec 11, 2007
posts: 3
votes: 0

Thanks :)

I've tried all the different combinations of the stylesheets, eliminating them one by one, including only one, including only a cut-down version with simple css formatting etc. All produce the same result with IE6 not including the css in the printed output (or in print preview).

I don't think that changing the media type from "all" to "screen" is ideal as the print.css just overrides a few styles in the other stylesheets (e.g. hides the lhs navigation etc). Making it "screen" would mean that it wouldn't be available to printed media wouldn't it?

I tried including all four stylesheets within the conditional comments but still IE6 wouldn't pick up any styles when printing.

Thanks for the help so far.


Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members