Skip to content

Chrome: page-break-inside avoid with tables #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
bottasergio opened this issue Jan 21, 2017 · 1 comment
Closed

Chrome: page-break-inside avoid with tables #72

bottasergio opened this issue Jan 21, 2017 · 1 comment

Comments

@bottasergio
Copy link

page-break-inside:avoid, does it really works with tables in Chrome?

< table style="page-break-inside:avoid" >
....
< /table >

I can´t make it works in Chrome. Tables are always fragmented in 2 pages.

@crnacura
Copy link
Member

I just tried this and it does seem to work: https://output.jsbin.com/fojisataba (print, and see the preview, the table is on the next page). Full example code: https://jsbin.com/fojisataba/edit?html,output

Note that you need to check on the parent's page-break-inside property, too, the 'page-break-after' property of the preceding element, and the 'page-break-before' property of the following element. In case the values are something else than 'auto', then 'always', 'left', and 'right' outweigh 'avoid'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants