3

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 ?

Mark Richards
  • 434
  • 1
  • 8
  • 24

2 Answers2

1

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

Community
  • 1
  • 1
  • was tr {display: block; } the only thing you did to get it working(and page-break-inside: avoid; of cause? I have the same issue but this does not seem to resolve it. – Todilo Aug 11 '14 at 11:32
1

You have to make all <tr> as {display: block} and then where you want page break, you can do {page-break-after: always}.

Generic Bot
  • 309
  • 1
  • 4
  • 8