View Single Post
Old 07-28-2025, 08:22 PM   #16
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,849
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by PilcrowandStanza View Post
THIS WORKED!!
thank you so much!
You are welcome

Quote:
Yes, this is for a book with 2nd level headers (more than just chapter titles) that has to continue from the text above, can't just break to a new page.
The property "page-break-after: avoid" controls page breaks on ereaders based on RMSDK and properties "break-after: avoid" and "-webkit-column-break-after: avoid" control page breaks on ereaders based on Readium/Webkit. So, unless your e-reader is very poor at handling epubs (like CoolReader), using the published style will prevent unwanted page breaks wherever you include it.

Quote:
Originally Posted by RbnJrg View Post
Employ the following style:

1. In your .css stylesheet:

Code:
.noBreakAfter {
    -webkit-column-break-after: avoid; /* This is for epub3, epub2 ebooks will ignore it */
    page-break-after: avoid; /* This is for epub2; epub3 ebooks will ignore it */
    break-after: avoid; /* Also for epub3 */
}
2. In your .xhtml:

Code:
<h2 class="noBreakAfter">Your title here</h2>

<p>Your following text here ... </p>
RbnJrg is offline   Reply With Quote