Skip to next page if content is splitting

Hello,

I create PDF with php using HTML table

I’m using the following css to jump to the next page if the last few rows of the table are split

tfoot > tr {
	page-break-before: avoid;
}

tfoot > tr:first-child {
	page-break-before: auto;
}

I added a second table after this table
There are two rows in the table
1st line header
2nd line content
For the second table I used the above css example

		tbody > tr {
			page-break-before: avoid;
		}
		
		tbody > tr:first-child {
			page-break-before: auto;
		}

<table>
<tbody>
	<tr>
		<th>TITLE</th>
	</tr>
	<tr>
		<td>content</td>
	</tr>
</tbody>
</table>

Second table jumps to next page if splitting
BUT, if the content of the second table is more than one page only one page is available, the rest of the content is not available

I don’t want the second table to be split on the first table’s page, but I want it to be split on the next page
how do i do this

The second table is placed on the first page because there is no possibility of division.
Perfect, no problem

Jumped to the second page as the second table would be split.
Perfect, no problem

The problem is here
Second table content more than one page
Placed the title on one page
Placed content on next page, but content missing, supposed to be fourth page but not

How should I fix this problem?

Sponsor our Newsletter | Privacy Policy | Terms of Service