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
  • 3,367
  • 4
  • 30
  • 46
  • 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
  • 24,563
  • 6
  • 44
  • 76
Andrzej Ziółek
  • 2,212
  • 1
  • 12
  • 21