When I print my table (ctrl+p), it does not break the way I want. The last row of the first page splits with part on the second page. Is there a solution for this issue? The rows can vary in content and size, and I have tried using properties like
page-break-before/after: auto. page-break-inside:avoid;
but to no avail. Any suggestions on how to break and move the table parts to the next page without splitting the last row for print media would be greatly 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> /* Numerous other <tr> elements here */ </table> </body> </html>