I am trying to print Header & footer on Every page using HTML's Thead
Tag in Asp.net.
when I try with a Logo or image using Div in thead
tag it works. But when I try with a table, in thead
tag then it doesn't work.
CSS:
I am using the below method
@media print {
thead { display: table-header-group; }
tfoot { display: table-footer-group; }
}
@media screen {
thead { display: block; }
tfoot { display: block; }
}
<table style="width:100%">
<thead>
<tr>
<th>record1</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
<table style="width:100%">
<thead>
<tr>
<th><table>
<tr><td>Name</td><td>Label</td></tr></table></th>
</tr>
</thead>
<tbody>
</tbody>
</table>
I need to know this information and logo shown on each page but after adding this information, they gave the margin. Please Review screenshots below https://i.stack.imgur.com/L0ZTs.jpg