Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
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,801
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
Old Today, 03:41 AM   #17
jugaor
Enthusiast
jugaor began at the beginning.
 
jugaor's Avatar
 
Posts: 33
Karma: 10
Join Date: Jun 2011
Location: Lima, Peru
Device: Kindle 10Gen / Kobo Aura HD / Nook STR
Hello everyone.

I've been using both lines for many years:
Code:
page-break-after: avoid;
break-after: avoid;
(in that order) with success in all tests (except, of course, the limited Cool, FBReader, Readera, etc.).

That's why this remark intrigues me:
Quote:
Originally Posted by RbnJrg View Post
and now ereaders based on webkit/readium finally gave support to "-webkit-column-break-after: avoid"
@RbnJrg, what devices or apps have you found that work with -webkit-column-break-after and don't honor break-after ? (I haven't found any yet.)
Since I prefer to avoid proprietary instructions (unless absolutely necessary), is this really necessary or are you just being overly protective?

Gracias!
jugaor is offline   Reply With Quote
Advert
Old Today, 12:14 PM   #18
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 jugaor View Post
Hello everyone.

I've been using both lines for many years:
Code:
page-break-after: avoid;
break-after: avoid;
(in that order) with success in all tests (except, of course, the limited Cool, FBReader, Readera, etc.).

That's why this remark intrigues me:

@RbnJrg, what devices or apps have you found that work with -webkit-column-break-after and don't honor break-after ? (I haven't found any yet.)
Since I prefer to avoid proprietary instructions (unless absolutely necessary), is this really necessary or are you just being overly protective?

Gracias!
All Android applications that support epub3 (Cantook, Kobo for Android, Reasily, Lithium, Infinity Reader, PocketBook, BookFusion, the old Gitden -but now is not working with modern Androids) will only honor
-webkit-column-break-after, -webkit-column-break-before and -webkit-column-break-inside. Also Thorium, Koodo Reader and ADE 4.x for PC and Foliate for Linux need those properties in order to handle page breaks.

The properties you mention are honored by ADE 2.x/3.x (ADE Legacy, that employs RMSDK), ereaders based on RMSDK and Calibre Viewer. Tolino Shine 5 needs the webkit properties. So, in order to cover al posibilities, employ always:

Code:
.noBreakAfter {
    -webkit-column-break-after: avoid;
    page-break-after: avoid;
    break-after: avoid;
}
Y nada que agradecer
RbnJrg is offline   Reply With Quote
Reply

Tags
header text keep together


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Change the header/footer text size. bmcs Calibre 2 03-09-2020 06:13 AM
Possible to remove header text? eTIPS Kindle Formats 2 08-19-2015 06:33 AM
Stripping a file from header text? norweger PDF 8 03-11-2015 03:49 PM
Getting text length from mobi header. mattst Kindle Formats 7 03-29-2012 06:31 AM
PDF Conversion - Removing Header / Footer Text heb Sony Reader 9 07-11-2010 11:02 PM


All times are GMT -4. The time now is 07:01 PM.


MobileRead.com is a privately owned, operated and funded community.