View Single Post
Old 06-05-2021, 08:09 AM   #4
rjwse@aol.com
Addict
rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.rjwse@aol.com ought to be getting tired of karma fortunes by now.
 
rjwse@aol.com's Avatar
 
Posts: 333
Karma: 2228060
Join Date: Dec 2013
Location: LaVernia, Texas
Device: kindle epub readers on android
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
Attached Thumbnails
Click image for larger version

Name:	Screenshot from 2021-06-05 06-50-24.png
Views:	180
Size:	204.0 KB
ID:	187505   Click image for larger version

Name:	Screenshot from 2021-06-05 06-46-55.png
Views:	180
Size:	174.0 KB
ID:	187506  
rjwse@aol.com is offline   Reply With Quote