Some tables in my PDFs stick down into the footer, rather than breaking to the next page before the row. It doesn't happen with every table, and I can't figure out the cause. It doesn't happen in Word output.
I saw some posts on problems with images sticking into the footer in PDFs (such as this one), so maybe the solution is similar. Has anyone else had the same problems with tables?
One of the problem tables is nested inside a paragraph (<p><table>....</table></p>), but others are not. Some of them exhibit the bad behavior when a row is breaking over the page. Maybe that's the problem? Can I use page-break-inside:avoid to prohibit breaking inside rows, maybe tr {page-break-inside:avoid; }?
Thanks,
Bob
Table rows extend into the footer in PDF
Re: Table rows extend into the footer in PDF
If you have paragraphs inside cells then the page-break-inside should be set on the <p> tag (or create a complex selector so that it's only set on <p> tags that are inside <td> tags). If you don't have paragraphs in the cells, then the page-break-inside should be on the <td> tag, not the <tr> tag. If you have a combination, then set it on both the <p> and <td> tags.
Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
Re: Table rows extend into the footer in PDF
This worked perfectly!LTinker68 wrote:... create a complex selector so that it's only set on <p> tags that are inside <td> tags
Code: Select all
td p {
page-break-inside:avoid;
}
Thanks!
Bob