当前位置: 动力学知识库 > 问答 > 编程问答 >

css - HTML table printing : row splitting in page break

问题描述:

I'm struggling with this issue for the last 2 hours. I already searched some answers here for similar problems, but none worked for me at all.

I have a report that is basically a HTML table with lots of rows. In screen it shows OK, but when i try to print on Chrome, it is rendered in two pages. The problem is the last row on the first page is printed half on first page and half on second.

I tried the page-break-inside:avoid trick, but nothing changes :

@media print {

body {

margin: 0.6cm !important;

}

tr {

page-break-inside:avoid !important;

}

}

Also, the margin does not work in the bottom of first page and top of second page.

Here is a printscreen of Chrome's print dialog, with the report rendered : http://postimg.org/image/ub2yygi3n/

Any ideas ?

Thanks !

分享给朋友:
您可能感兴趣的文章:
随机阅读: