I'm having trouble with displaying table headings when printing a table with many rows and columns. The table heading displays on the first page, but not on subsequent pages. I searched Google for solutions and tried various methods found on websites, but still couldn't fix the issue. Here is my CSS:
<style type="text/css" media="print" >
table td {
border-bottom:1px solid gray;
}
th {
font-family:Arial;
color:black;
background-color:lightgrey;
}
thead {
display:table-header-group;
}
tbody {
display:table-row-group;
}
</style>
Here is my HTML code:
<table border="0" cellpadding="2" cellspacing="0">
<thead>
<tr>
<th>ID</th>
<th>First Name</th>
<th>Last Name</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>First Name 1</td>
<td>Last Name 1</td>
</tr>
</tbody>
</table>
If anyone has a solution or can help me troubleshoot this issue, I would greatly appreciate it. Thank you.