0

As I was looking for a solution I found this: Preventing Page Breaks in a Table When Printing

.reportTable {
    page-break-inside: avoid;
}

It was sad to see that it only works in opera. Does anyone know a solution to not let tables and div's to be broken?

Also the previous asker told:

.reportTable {
    page-break-after: always;
}

Can be used but leaves a lot of useless space

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
matthy
  • 8,144
  • 10
  • 38
  • 47

2 Answers2

1

Maybe you could try that property on the latest browsers.

Firefox seems to support it at version >= 19.0
Chrome seems have always supported it since v1.0
Internet Explorer since v8
Opera since v7.0

Source :- https://developer.mozilla.org/en-US/docs/Web/CSS/page-break-inside

mrmoje
  • 3,714
  • 3
  • 20
  • 18
  • Thank you it seems its works indeed i just thougth it did not work of what i had read. in fact The code of my site was just wrong – matthy May 31 '13 at 14:38
0

The page-break-inside CSS property adjusts page breaks inside the current element.

/* Keyword values */
page-break-inside: auto;
page-break-inside: avoid;

/* Global values */
page-break-inside: inherit;
page-break-inside: initial;
page-break-inside: unset;
Rafiqul Islam
  • 931
  • 11
  • 14