When printing documents in Chrome browser, the table header (thead) does not appear on every page. I want to ensure that the table header is displayed on each printed page, just like it is done with IE and Firefox. However, Chrome does not support this feature. Is there an alternative method to achieve this?
Here is my code:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Test</title>
<style type="text/css">
@media print
{
table { page-break-after:auto }
tr { page-break-inside:avoid; page-break-after:auto }
td { page-break-inside:avoid; page-break-after:auto }
thead { display:table-header-group;}
tfoot { display:table-footer-group }
}
</style>
</head>
<body>
<table>
<thead>
<tr><th>TH 1</th><th>TH 2</th></tr>
</thead>
<tbody>
<!-- Table body rows here -->
</tbody>
</table>
</body>
</html>
This code example includes a sample program with table headers and bodies. Can someone assist me in resolving this issue? Do I need to make adjustments to the CSS part of the code?