On a budget screen, I display the products registered within a Foreach in a table (each product), so in some cases, at the time of page printing the table gets broken and ends up getting very ugly on the print. I tested in my CSS the following:
@media print {
table {
page-break-after: always;
}
}
But it breaks the page ALWAYS every time I have a table, but what I need is to break dynamically only when there is a page break. I also tested with 'auto' rather than 'always' and did not succeed.
How can I break only when Table breaks on the print screen?
EDIT: I searched in several places and so far I have not been able to resolve the dynamic page break, ie I only break the page when the table is broken.
A cruel doubt, why the 'self' does not work? Browser incompatibility? (chrome v36)