widows of h2 in pdf
Thanks for input. Regarding your question:"why not just put a page break before it?
h2 { page-break-before: always }" it is because the h2 segments are extremely short and look wrong if only one is on a page, but look good if bunched together as many as possible per page, but look bad with a widowed h2. The h2s show up good in the TOC.
I mentioned in the questions that wrapping h2s and following Ps in a DIV certainly works and you said so:"and page-break-inside requires a container to apply to the inside of it, so if you want to use it you have to wrap the stuff you want to use it on in a div"
I was trying to find an elegant solution of no widows of h2 without wrapping all h2+ps. Basically, I'm learning the ins and outs of how to solve programming css limitations. Thanks for the help. Best regards, Pop
|