01-12-2013, 05:36 AM | #1 |
Junior Member
Posts: 8
Karma: 10
Join Date: Oct 2012
Device: Amazon Kindle Fire
|
page-break-before not responded to in any Epub reader
Hi,
I am using 2 EPub Readers: 1) Kobo 2) Bluefire At a appropriate point in my Ebook, I have introduced a <div></div> bound to a class named "pageBkBe4". Eg: <div class="pageBkBe4"></div> CSS: .pageBkBe4 { page-break-before:always; } I am wanting to start the content after this <div></div> on a new page. Both: 1) Kobo 2) Bluefire ignore this instruction. Any advice on how to introduce a page break at an appropriate place in an EPub document so that EPub readers like Kobo, Bluefire respond correctly will be very appreciated. |
01-12-2013, 06:29 AM | #2 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Maybe they are ignoring the empty <div>, not the page-break-before.
Try with <div class="pageBkBe4"> </div> instead. |
01-12-2013, 06:49 AM | #3 |
Color me gone
Posts: 2,089
Karma: 1445295
Join Date: Apr 2008
Location: Central Oregon Coast
Device: PRS-300
|
Can you use capitalized class names? Most everything else in XHTML has to be lower case.
|
01-12-2013, 09:43 AM | #4 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Pre-defined names (element names, pseudo-clasess, pseudo-elements) are mostly lowercase (some entities have uppercase letters too), and XHTML is case-sensitive, but you can use uppercase letters in any custom-defined names (classes, ids, entities).
|
01-12-2013, 09:39 PM | #5 |
A curiosus lector!
Posts: 463
Karma: 2015140
Join Date: Jun 2012
Device: Sony PRS-T1, Kobo Touch
|
Jellby,
Just a question: does the "div." statement has to be indicated in the CSS? Thus, the declaration of the op should be read as following: "div.pageBkBe4" not simply ".pageBkBe4". Am I mistaken? |
01-13-2013, 03:21 AM | #6 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
The element name is not necessary, but the meaning is slightly different:
div.pageBkBe4 = any <div> with class="pageBkBe4" .pageBkBe4 = *.pageBkBe4 = any element with class="pageBkBe4" |
01-13-2013, 06:39 PM | #7 |
A curiosus lector!
Posts: 463
Karma: 2015140
Join Date: Jun 2012
Device: Sony PRS-T1, Kobo Touch
|
Thank you Jellby for the "mise au point".
|
01-14-2013, 04:19 AM | #8 |
Junior Member
Posts: 8
Karma: 10
Join Date: Oct 2012
Device: Amazon Kindle Fire
|
Thanks.
Much appreciate the input given. Will load the <div> with and rather than leaving it empty and check. Will convert the class name into lowercase and check. I will try all the suggestions one-by-one and revert on the results shortly. Thanks people. |
01-15-2013, 05:07 PM | #9 |
Resident Curmudgeon
Posts: 74,420
Karma: 129358310
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
It is better to use lower-case style names in the CSS as it's very easy to mistype and get the case incorrect in which case, you cannot be sure that the reading software will not need to be case specific.
As for page breaks, the only place I ever use them is for endnotes so I can have one file and be able to show only one endnote at a time. Otherwise, I prefer splitting the XML flow where you would otherwise have a page break. I've seen some ePub with chapters merged together and then when the flow is too larger, the text continues into a new flow. Very messy. Besides, with iBooks being a PITA regarding page breaks, it's just easier to start a new XML where the page break would have gone. Last edited by JSWolf; 01-15-2013 at 05:10 PM. |
01-17-2013, 04:09 PM | #10 |
Member
Posts: 17
Karma: 10
Join Date: Mar 2011
Device: Kindle
|
|
01-18-2013, 12:49 AM | #11 | |
Wizard
Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
https://www.mobileread.com/forums/sho...d.php?t=203057 |
|
01-18-2013, 03:47 PM | #12 |
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
The simplest way to force a page break is to use a separate HTML file. Each file always starts on a new page in compliant readers unless you explicitly override page-break-before on the body tag.
|
01-19-2013, 01:24 AM | #13 | |
Junior Member
Posts: 8
Karma: 10
Join Date: Oct 2012
Device: Amazon Kindle Fire
|
Here is my first reply.
Have changed my page-break code to be: <div class="pageBkBe4"> </div> .pageBkBe4 { page-break-before:always; } I have introduced the between the <div class="pageBkBe4"></div> I found this works perfectly in Bluefire Ebook Reader run on the iPad 2. It is however ignored by Kobo Ebook Reader run on the iPad 2. Do Ebook Readers work differently? Has anyone has similar experiences with different Ebook Readers on an iPad or a Laptop? Would really love to know. Quote:
How does one place separate HTML files within Sigil to get appropriate EPub output? Can anyone help explain this ? I have always created separate HTML files per Chapter but flowed this as a single XHTML file in Sigil when converting to EPub. What am I doing wrong? |
|
01-19-2013, 01:28 AM | #14 |
Junior Member
Posts: 8
Karma: 10
Join Date: Oct 2012
Device: Amazon Kindle Fire
|
Here is my second reply:
I have not know CSS processors any where to require CSS IDs or Classes to be named in lowercase exclusively. Hence I am curious to understand why I should change CSS IDs or Classes names to lowercase. Does any one have any information about EBook Reader such as Kobo, Bluefire, requiring CSS IDs or Classes in lowercase? Would welcome any input. |
01-19-2013, 03:52 AM | #15 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
page break in epub on iPad | JoanneM | ePub | 3 | 12-07-2011 09:59 AM |
Mobi to epub page break | mr.ninja13 | Calibre | 23 | 08-09-2011 02:06 PM |
epub to mobi page break on chapters | cybmole | Conversion | 23 | 02-23-2011 10:42 AM |
Can I fix ePub page break formatting? | arcane_scholar | Calibre | 3 | 02-02-2011 04:01 PM |