Forum Moderators: not2easy

Message Too Old, No Replies

CSS to bypass Firefox Print Preview bug?

Firefox hangs on Print Preview for table in excess of 1 page

         

albo

4:22 pm on Aug 16, 2007 (gmt 0)

10+ Year Member



As documented at
[bugzilla.mozilla.org...]
(and still not fixed on 2.0.6) Firefox still hangs on Print Preview on some web pages containing tables in excess of one page in length!

I can't figure out how to pop in the appropriate "page-break-inside" for my table!

So far, I've put out a .doc instead of a web page so as to avoid this embarrassment for page viewers...any suggestions beyond severe table-splitting?

JAB Creations

10:07 pm on Aug 17, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Firefox uses the Gecko rendering engine. Firefox 1.0 was based on Gecko 1.7x, Firefox 1.5 and 2.0 use Gecko 1.8x, and Firefox 3.0 will use Gecko 1.9. So there will be no fix for Firefox 2.x.

Gecko does not at least print preview pages well (no printer to verify is what is printed is the same) and this is actually one of the few things IE does well.

As far as stopping Firefox from crashing the first question I would ask most people is, "Is the information inside your table tabular or not?" If it's no then you shouldn't be using a table in the first place (if you use (X)HTML as intended). A good example of tabular data would be a food nutrition label or the stats on the back of a baseball card.

If the answer is yes then I would recommend attempting to cap the size of the table using CSS though I'm not sure if this would work or not. max-height may be subjective, you could combine various things such as fixed positioning though I'm not sure how that would effect the rest of your layout.

It does look like they have been working on this for Gecko 1.9 but that it will not block 1.9 if it's not finished within their bug cut-off time. However you're in luck as Gecko 1.9 has been taking longer then expected (no surprise there!)

If you're curious to watch the day-to-day effects of this bug (for better or worse) download a Firefox Nightly Build [ftp.mozilla.org]. I highly recommend creating a separate profile for your current version of Firefox and your nightly build.

- John

albo

12:48 am on Aug 18, 2007 (gmt 0)

10+ Year Member



Thanks much for the enlightenment.

Unfortunately, yes, it is tabular data. It's a table of classes for a client: course topic, date, day-of-week, time, location, ...and so on... for 34 classes! (Lucky to squeeze in sideways, and I had to use a smallish font, but the client *insists*.

Hmmm...strange, though: I tried splitting the table in several places, with page-break-before each table, and still got the hang! Guess I'll keep messing with it, following carefully and reading what I can from your sage advice!

(I'm barely intermediate on css stuff...)