Why won't my website print?
April 8, 2006 2:51 PM   Subscribe

Why won't my website print in Firefox?

I'm trying to print the contents of this page but Firefox (1.5.0.1, WinXP) only prints the first page. This seems to be a known problem with some pages, though the specific problem doesn't seem to be listed in bugzilla. I've tried putting the data into a table but it makes no difference. Internet Explorer (6.0) prints all the pages, but on some pages the second column of data (the title of the work) is missing. I'll put this down to IE's poor handling of CSS.

The rest of the site prints fine in IE, but FF will only print the first page of data from each web page. What's wrong with my site? It validates as XHTML Strict & CSS.
posted by cbrody to Computers & Internet (7 answers total)
 
I don't know for sure, but I bet it has something to do with the entire content being within the 'main' div, with absolute positioning.
posted by adzm at 3:03 PM on April 8, 2006


I took out position:absolute in your css and now FF1.5 print preview is showing 7 pages.. although they are blank pages ;) maybe this will get you closer to the answer you seek however.
posted by adzm at 3:06 PM on April 8, 2006


Yes. It's the "position: absolute" that is getting you - you're telling the browser to nail down everything in a single place, on a single page, and it is dutifully obeying you. If your printer had really big paper, such that the whole page could fit on one sheet, this would work fine.

Your solution is probably to add a print stylesheet to the CSS. Don't use position:absolute in the print stylesheet.
posted by jellicle at 3:07 PM on April 8, 2006


Oh, they were blank because the body color:white attrib is in the source and not the CSS. If you just take out the position:absolute it will print correctly. not sure what to do with the white text, but it might help if you change the body backgroundcolor style to your pink color instead of white.
posted by adzm at 3:12 PM on April 8, 2006


Thanks guys! I've added a print stylesheet and all works fine now.
posted by cbrody at 4:07 PM on April 8, 2006


Cool that people found the solution, although it's silly to think that "position: absolute" means that the printer should restrict everything to one page. That's just wrong.
posted by delfuego at 5:54 PM on April 8, 2006


That's why print stylesheets exist, delfuego.
posted by MadamM at 6:47 PM on April 8, 2006


« Older Fibroid treatment options   |   Getting the full VOB off DVD Newer »
This thread is closed to new comments.