Forum How do I...?

Keep 2 paragraphs together, without a div

ixgal
Hi,

I would need to keep together 2 paragraphs (let's say with class "a" and class "b") in a whole PDF.
Is there a way to achieve that, without using a div around the 2 paragraphs?

Thanks
mikeday
You could apply "page-break-inside: avoid" to both paragraphs and "page-break-after: avoid" to the first paragraph, although this will work best if they are not too long.
ixgal
Thanks, it works!