Quote:
Originally Posted by Psymon
Oh, that's interesting -- something like that never even occurred to me. Would that wrap the page-break:avoid around both items, together, though? Or would it add it to each individually/separately? If the latter, then it wouldn't accomplish what I'm trying to, of course.
|
Actually it is not exactly the same as wrapping a div around p.speaker and p.verse:
p.speaker+p.verse selects the first p.verse following any p.speaker, so the page-break-before:avoid; prevents a break between p.speaker and p.verse, and page-break-inside:avoid; prevents a break inside the p.verse immediately following the p.speaker, but unlike with the wrapper div it is still possible to break inside the p.speaker.
So you would also need to add
Code:
p.speaker {
page-break-inside: avoid;
}
but it is not possible to select only the p.speaker preceding a p.verse so this would have to apply to all p.speaker.