Do not cut last lines of a table from a page to the next page
Hello,
Is it possible to not cut the last lines from a page to the next page in a table when the place is not sufficient? I mean if the last line cannot fit in the page, this line to start on the next.
The header of the table is repeated on every page until its end.
I'm not sure exactly what it is you want. If the last line cannot fit on the current page, it will already be moved to the next page, is there some other change you would like?
Sorry, maybe I was not clear.
Yes, it will be moved, but I want if the line cannot fit on the current page, the whole line (data/information) to start on the next page. I don't know if it's possible but I wanted to ask.
You can apply "page-break-inside: avoid" to the element, or use "page-break-before: avoid". Perhaps you could attach an example.
I attached the CSS that I'm using and an example of the problem that I want to solve.
In page1.png you can see that the information in the 6th column cannot fit on the same page and the rest of the text goes to the other page (page2.png). I want to avoid this situation like the whole row
sample text starts on the next page.
- example.css 0.8 kB
- page1.png 10.5 kB
- page2.png 56.4 kB
Mike,
I just tried with
table tr {
page-break-inside: avoid;
}
and it seems to work.