That should be page-break-after: avoid. A div with PBA: always would force a page break after the div and before the h2, which would mean the h2 tag (which is outside the div) would always be on the top of a separate page. Bear in mind that most readers ignore page-break-after: avoid, however, so if you really want to force them into one page whenever possible, you'd probably need to wrap a div around the img and h2 tags and use page-break-inside: avoid, which at least some readers support.
Also, heading tags are block-level tags, and are not allowed inside a paragraph. Move it outside.
|