When printing page table rows/cells gets split on page break

最后都变了- 提交于 2019-12-02 04:38:07

问题


I have an table with nested tables in. When I am printing this page, the cells gets split on page break.

Is there any chance that I can control that it should jump onto the next page instead of splitting the middle?


回答1:


You can have a look at the page-break-before css property. For example you can set it to auto on each of your cells.

Bur I can't guarantee this will work, each navigator prints a little differently. Firefox is known to have problems printing big tables (more than a page) for example.




回答2:


I have used the following method to keep the contents of a row together on one page:

<tr style="page-break-inside: avoid">

Unfortunately browser support is limited. Works fine in Internet Explorer 9, but not in Chrome 22 or Firefox 15.



来源:https://stackoverflow.com/questions/5139419/when-printing-page-table-rows-cells-gets-split-on-page-break

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!