FireFox Page Break CSS Not Displaying Correctly

I’ve always used CSS to handle page breaks when printing from the web, and its always been easy and pretty straight forward to implement.  However FireFox would stop printing after 1 or 2 pages from what should have been about a 10 page print job.

After some googling I found that a fair few people have been having the same problem as me, only in FireFox though, every other browser is fine.  The problem was the CSS I was using:

page-break-after:always;

FireFox didn’t like this.  From what I found on the web the work around was to use page-break-before instead.  I searched bugzilla to try and find out more details on why this happens, the best I could find was this lengthy discussion, with instances of this problem from 2002.   So my lesson from this is to use page-break-before:always instead of after.

Leave a Reply