I have a table which is OK in web pages, but when printing my table (ctrl+p) it breaks not the way I want. The last row of the first page splits with the part of the row on the first page and the other part of the row on the second page. So, is there any way to overcome the problem, the rows can have different content and size. I also tried this properties
page-break-before/after: auto. page-break-inside:avoid;
but with no result. Is there any way to break the table and move the part of the table to the next page without splitting the last row into two parts for print media? Any help will be appreciated.
table,th,td { border:1px solid black; border-collapse:collapse; } th,td { padding:5px; }
</style> </head> <body> <table style="width:100%;"> <tr> <th><span>Firstname</span></th> <th><span>Lastname</span></th> <th><span>Points</span></th> </tr> <tr> <td><span>Jill</span></td> <td><span>Smith</span></td> <td><span>50</span></td> </tr> <tr> <td><span>Eve</span></td> <td><span>Jackson</span></td> <td><span>94</span></td> </tr> <tr> <td><span>John</span></td> <td><span>Doe</span></td> <td><span>80</span></td> </tr> /*here I have many <tr> elements*/ </table> </body> </html>