My table element is frequently very tall with numerous rows, and each time the browser prints the document, there is an unnecessary page break between the header and the start of the table. This issue persists even when physically printing the document.
I attempted to resolve this problem by using the following code:
table {
page-break-before: avoid;
}
However, this code did not eliminate the page break as desired. Is there a different code I should be utilizing instead?
Please refer to the image link below to see the page break in action (the table contains more rows but only the first five are displayed):