I have several tables on one page, and when I open the print preview in a browser, I've got some issue as on the screenshot. It happens when one of the tables is not fit to a paper. Is there a valid CSS way to prevent this problem.
Html page to reproduce behavior:
<html>
<head>
<title>Page Title</title>
<style>
table {
border-collapse: collapse;
margin-bottom: 30px;
}
th, td {
border: 1px solid #777;
}
</style>
</head>
<body>
<table>
<thead>
<tr>
<th>Header cell</th>
<th>Header cell</th>
</tr>
</thead>
<tbody>
<tr>
<td>Body cell</td>
<td>Body cell</td>
</tr>
<tr>
<td>Body cell</td>
<td>Body cell</td>
</tr>
<tr>
<td>Body cell</td>
<td>Body cell</td>
</tr>
<tr>
<td>Body cell</td>
<td>Body cell</td>
</tr>
</tbody>
</table>
<table>
<thead>
<tr>
<th>Header cell</th>
<th>Header cell</th>
</tr>
</thead>
<tbody>
<tr>
<td>Body cell</td>
<td>Body cell</td>
</tr>
<tr>
<td>Body cell</td>
<td>Body cell</td>
</tr>
<tr>
<td>Body cell</td>
<td>Body cell</td>
</tr>
<tr>
<td>Body cell</td>
<td>Body cell</td>
</tr>
</tbody>
</table>
</body>
</html>