Quote:
Originally Posted by dgatwood
if you can wrap the two pieces of content in a div and mark that with page-break-inside: avoid, you should usually prevent the break without forcing a break before the first item, provided that:
- Neither the enclosing div nor the content inside it uses position: absolute or position: fixed
- The content of the enclosing div can fit on a single page
- None of the interior elements expand to fill the screen
- The enclosing element is a block element (not inline or inline-block or table-*)
- The enclosing content is not inside a table (known WebKit bug)
|
I'll try this. If it works more often than it does now (i.e. if it works even once), it's an improvement.
All the same, it seems odd that "avoid" is basically ALWAYS ignored of page-break-after. I would have thought "keep with next (where feasible)" would be a sensible interpretation; oh well. Yes, I know it's only advice, but even my mother's advice wasn't ignored that consistently...
Thanks!