How to prevent thead to be printed on all pages

Multi tool use


How to prevent thead to be printed on all pages
I want to know if it's possible, when a user begins to print an html page, to prevent the thead
of a table to be printed on all the pages ?
thead
It's because I use page-break-after: always;
on an element situated before my table, and because of that my table header is also printed on the first page...
page-break-after: always;
I cannot replace my thead
by a tr
because a hard part of my code lays on that thead
.
thead
tr
thead
No, I can't, because these elements does not appear directly on my html page. It is an inner behaviour of the thead nodes that automatically print them on all the pages.
– testa abalez
Oct 13 '16 at 10:27
1 Answer
1
With THEAD you cannot do this. But you can try to apply display: table-row
to <thead>
but it doesn't work in all browsers
display: table-row
<thead>
When long tables are printed, the head and foot information may be repeated on each page that contains table data (official docs)
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
can't you add <link rel="stylesheet" type="text/css" href="print.css" media="print"> to your head and in print.css add a display:none to the elements you don't want to print?
– Marouen Mhiri
Oct 13 '16 at 10:24