I have a long table with header and footer. What I want to do is to create a print function on the table. Below is an example of my code:
tfoot {
display: table-footer-group;
vertical-align: middle;
border-color: inherit;
}
<table>
<thead>
<tr>
<td>This is a header</td>
</tr>
</thead>
<tfoot>
<tr><td>This is a footer</td></tr>
</tfoot>
<tbody>
<tr>
<td>Row</td>
</tr>
<tr>
<td>Row</td>
</tr>
<tr>
<td>Row</td>
</tr>
<tr>
<td>Row</td>
</tr>
<tr>
<td>Row</td>
</tr>
<tr>
<td>Row</td>
</tr>
<tr>
<td>Row</td>
</tr>
<tr>
<td>Row</td>
</tr>
<tr>
<td>Row</td>
</tr>
<tr>
<td>Row</td>
</tr>
</tbody>
</table>
From the code above, when it comes to printing process, it shows that every printed page has its own header but it doesn't work out with their footer. My question is, how to display a footer in each of the long printed page.