Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old Today, 04:24 AM   #1
icearch
Connoisseur
icearch began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Nov 2025
Device: none
About page-break

page-break-after
page-break-before
page-break-inside

How well are they supported in epub3 and 2 now? I have used them in some case but they tend to fail.

The only certain way I know to let content start in a new page is creating a new xhtml file. But some web novel can have 1000 chapters, it's tedious to have 1000 xhtml files.

So how well are they work exactly now? How can I guarantee a page break?
icearch is online now   Reply With Quote
Old Today, 05:37 AM   #2
Karellen
Wizard
Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.Karellen ought to be getting tired of karma fortunes by now.
 
Karellen's Avatar
 
Posts: 1,744
Karma: 9501034
Join Date: Sep 2021
Location: Australia
Device: Kobo Libra 2
Those tags are deprecate:
https://developer.mozilla.org/en-US/...e-break-inside

Should use:
https://developer.mozilla.org/en-US/...s/break-inside

Though the Libra2 does not recognise the newer tag and still prefers the deprecated tag.

Use both tags in your CSS. Something like this...
.nopagebreak {
break-inside: avoid;
page-break-inside: avoid;
}
Karellen is offline   Reply With Quote
Advert
Old Today, 06:18 AM   #3
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 81,554
Karma: 150265873
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by icearch View Post
page-break-after
page-break-before
page-break-inside

How well are they supported in epub3 and 2 now? I have used them in some case but they tend to fail.

The only certain way I know to let content start in a new page is creating a new xhtml file. But some web novel can have 1000 chapters, it's tedious to have 1000 xhtml files.

So how well are they work exactly now? How can I guarantee a page break?
Instead of doing a page break before or after, just split the HTML where you want the page break. That way the page break will 100% work.
JSWolf is offline   Reply With Quote
Old Today, 06:40 AM   #4
icearch
Connoisseur
icearch began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Nov 2025
Device: none
The tutorial I see is so old...
I'm going to try break before and after later. Thank you.
icearch is online now   Reply With Quote
Old Today, 06:41 AM   #5
icearch
Connoisseur
icearch began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Nov 2025
Device: none
Quote:
Originally Posted by JSWolf View Post
Instead of doing a page break before or after, just split the HTML where you want the page break. That way the page break will 100% work.
Bro, do you read other's post or not?
icearch is online now   Reply With Quote
Advert
Old Today, 08:42 AM   #6
icearch
Connoisseur
icearch began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Nov 2025
Device: none
Quote:
Originally Posted by Karellen View Post
Those tags are deprecate:
https://developer.mozilla.org/en-US/...e-break-inside

Should use:
https://developer.mozilla.org/en-US/...s/break-inside

Though the Libra2 does not recognise the newer tag and still prefers the deprecated tag.

Use both tags in your CSS. Something like this...
.nopagebreak {
break-inside: avoid;
page-break-inside: avoid;
}
Sadly, break-before: always; and break-before: page; does absolute nothing.
At least in Sigil's readium plugin.
Does this have something to do with the plugin? Or it will happen in other readers out there?
icearch is online now   Reply With Quote
Old Today, 08:55 AM   #7
icearch
Connoisseur
icearch began at the beginning.
 
Posts: 52
Karma: 10
Join Date: Nov 2025
Device: none
And more test, yes, lot's of reader software does not work. Some do though.
Why it is so hard to put such basic and simple function to work?
icearch is online now   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
page-break-before: always; avresbo Kobo Reader 1 03-02-2023 09:30 AM
Do you use page-break-after and page-break-inside? fluoresce ePub 14 05-24-2017 02:57 AM
No page break for H2 RickAltman Calibre 2 06-25-2012 12:02 PM
PAGE BREAK JFS-NMF Recipes 0 03-04-2011 10:15 AM
Page break before <b> flowoeB Calibre 14 04-12-2009 04:05 PM


All times are GMT -4. The time now is 09:00 AM.


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