I understand that the CSS page-break-inside:avoid
instruction is supposed to prevent a page break within a div when an HTML document is printed. Through searching the internet, I have found that it is only supported by Opera and IE8. Is there a work around that allows me to prevent page breaks in Firefox (3.6) or IE versions less than 8?
The page-break-inside property sets whether a page-break should be avoided inside a specified element. Tip: The properties: page-break-before, page-break-after and page-break-inside help to define how a document should behave when printed. Note: You cannot use this property on absolutely positioned elements.
always − A page break should be forced after this element's box. avoid − No page break should be placed after the element's box if at all possible. left − Force one or two page breaks after the element's box, such that the next page on which an element is printed will be a left-hand page.
If set display of tr as block or some thing else then it change the formatting of table and insert double border. Or it is possible to insert the table header on each page, where the table was splitted.
Syntax: page-break-inside: auto; avoid: It avoids a page break inside the element.
Sorry, my answer is "not possible", although I'd love it if anyone can prove me wrong.
I've ran into the same problem lately, and after doing a little bit of research I decided to just go with
page-break-after: always;
after every several number of elements.
http://reference.sitepoint.com/css/page-break-inside
http://reference.sitepoint.com/css/page-break-after
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With