Forum How do I...?

Keeping multiple paragraph lines with section header

Bram
I avoid orphaned section headers with:
page-break-after: avoid;


This keeps the header with the subsequent text paragraph.

Yet this only keeps 1 line of text, because I have set
orphans: 1;

which is the best choice for this book for other reasons.

Is there a way of keeping 2 lines of text with the section headers in this case?

Many thanks!

Edited by Bram

dauwhe
Have you tried something like h2 + p { orphans: 2 } ?
Bram
I should have thought of that. Many thanks, it works like a charm.
jim_albright
Thanks for the tip. I can use that too. Right now I adjust the tracking of select paragraphs by hand to do page fit.

Jim Albright
Wycliffe Bible Translators

  1. Princess.PNG107.2 kB
    Princess - front end to Prince XML