Reputation: 434
i have dynamic items in tr
, try to pint two tr
per page and my css is
CSS :
@media print {
body {font-size:10px}
table tr:nth-child(2n) {
page-break-after: always;
}
.noptrint {display:none;}
}
and see http://jsfiddle.net/4jr8s/
it work on firefox
but not in Chrome
browser, what is problem in chrome
?
Upvotes: 3
Views: 5343
Reputation: 11
You have to make all <tr>
as {display: block}
and then where you want page break, you can do {page-break-after: always}
.
Upvotes: 1
Reputation: 52
How to achieve page break in HTML table for Google Chrome?
Finally i resolved this issue. I madetr{display:block;} and then i fixed the the cell spacing. page break only works on block level elements. @sarsarahman
Upvotes: 1