![]() |
||
![]() |
Alden Bates' WeblogFeigning normality since 1973IE: Print versus Screen RenderingFiled in: Website Management. Internet Explorer, why do you suck so much? I'm working on a new site scheme for the NZDWFC web page and recently had a brainwave that I could make a special style sheet to render the pages in a format more suitable for printing. You can specify the media type of a style sheet so that the browser selects the appropriate one to use given the situation. I can therefore provide a style sheet which includes all the menus for display on the computer screen, and another one which hides those for printing. Unfortunately I hadn't counted on Internet Explorer being a dick. Here's a review of the NZDWFC novelisation of Shada, rendered in IE using my print style sheet: Here's the print preview of the same document, using the same style sheet: So IE uses a different rendering process for displaying on the screen versus printing. It doesn't treat floats correctly (the text should flow around the image, as it does in the in-browser render) and it's ignoring the column widths I set, causing the content to be shifted to the right, and losing the right-hand side of the text. And I thought it was bad when I had to deal with IE's in-browser differences. Grrrrr. Edit: It wasn't that the column widths that was the problem - apparently setting page margins seems to upset the print renderer. Once I removed the margin definition, it laid out fine. The text still isn't flowing around the image though. Posted August 2, 2008 1:40 PM Post a comment | |