View Single Post
Old 11-13-2019, 09:19 PM   #30
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,801
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by jhowell View Post
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!
RbnJrg is online now   Reply With Quote