I have a bit of logic in one of my Rails views that states if the table
I'm about to print is over 7 rows, create a div
around the table
with a min-height
style to make sure the footer below this table
goes to the end of the page 2, rather than page 1.
I've tested this logic in many browsers including: Chrome, Safari and IE (!) and they all work as expected. Firefox, however, is adding a pesky page-break right before the div
and table
. I have tried avoiding this page-break by adding this CSS style in the div
and also in the table
: page-break-before: avoid;
as well as this newer Firefox style: break-before: avoid;
, but it doesn't seem to affect this page-break during printing. Any other ideas? Does Firefox automagically add a page-break before large divs when printing?
<div style='min-height: 1150px;'>
<table>
blah blah table stuff...
</table>
</div>