1

I have an HTML report contain many small tables that never will be bigger than an A4 page.

What I need that if one of those tables is showing in two pages to be pushed to the next page.

See the image of an example of a table needed to be shown on the next page.

enter image description here

Mansour Alnasser
  • 4,446
  • 5
  • 40
  • 51
  • Trivial to find on your own, with basic research keywords such as “html print prevent element break” … http://idownvotedbecau.se/noresearch/ – CBroe Jul 02 '18 at 08:58

1 Answers1

4

Below trick should solve your issue (assuming your rows are divs).

You can add this rule to your CSS.

@media print  
{
    div {
        page-break-inside: avoid;
    }
}
Ivan
  • 34,531
  • 8
  • 55
  • 100
Andrzej Ziółek
  • 2,241
  • 1
  • 13
  • 21