Welcome to WebmasterWorld Guest from 18.104.22.168
Forum Moderators: incrediBILL
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.
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!
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.