Quote:
Originally Posted by jhowell
I don't think that will work. In my testing the page-break-avoid seems to only be effective if used with a relatively small width. The details of this are mysterious.
|
I did the test and worked! Moreover, I wanted to find a way to avoid a break in the following case:
Code:
<h2>My Title</h2>
<h3>My Subtitle</h3>
<p>Some text here ... </p>
After <h3>, a break could be produced (I don't know why, but page-break-after: avoid doesn't work with two <h*> tags consequtive. But with:
Code:
<h2>My Title</h2>
<div class="joint">
<h3>My Subtitle</h3>
<p>Some text here ... </p>
</div>
with
Code:
.joint {
float: left;
width: 100%;
page-break-inside: avoid;
}
all remains together! Do the try!