08-28-2014, 11:17 AM | #31 | |
Chief Bohemian Misfit
Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
That page-break thing does work "everywhere", though? I have this weird feeling that I read somewhere (ages ago) that some devices or apps just ignore it. One question about the code you gave, where you had this... Code:
<div class="pagebreak" style="page-break-before:always; height:0; margin:0; padding:0"></div> Thanks again! This is so reassuring, to think that this will actually resolve my original problem! EDIT: I'm slow. I gather that all I need to do, from what you said, is basically put this in my HTML... Code:
<div class="pagebreak"></div> Code:
div.pagebreak {page-break-before:always; height:0; margin:0; padding:0;} Last edited by Psymon; 08-28-2014 at 11:22 AM. |
|
08-28-2014, 11:38 AM | #32 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Yes, that's what I meant. I'm not sure it will work everywhere, probably not, I'd bet there are some readers that don't honour pagebreaks, but I guess there would be a few other things that wouldn't work. For some renderers you may have to include some content in the <div>, or it will be discarded: <div class="pagebreak"> </div> should be enough.
There's a caveat with this solution (or with forcing pagebreaks in general): the page numbers in ADE will ignore this pagebreak, i.e., there will be no new page number after the pagebreak, it will just continue being the same "page" as before. |
Advert | |
|
08-28-2014, 11:48 AM | #33 | ||
Chief Bohemian Misfit
Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
I guess there's not much I can do -- no matter how I tried to do this -- about older (or crappier) devices that would ignore what I'm trying to accomplish here, but hopefully in time these things will just be the norm. If/when I decided to convert my EPUB to MOBI format, for Kindle, are there any issues related to this that I should know about? I do hope that I don't have to completely re-think (and re-do) everything for that. Quote:
Thanks so much for your help, Jellby -- as always! You should get a medal for the number of times you've saved the day (for me, and others). |
||
08-28-2014, 11:52 AM | #34 |
Chief Bohemian Misfit
Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Oh, I forgot to ask...
Does it matter at all if/when one uses page-break-before or page-break-after? Is there, in fact, any real difference? I mean, apart from one being "before" and the other "after" (duh), but I guess I was thinking that where I have a single file split up into separate "pages", like this... Chapter Title Page Full Page Image Chapter Text ...then should I have the page break after the Chapter Title be after? I was just thinking that if I made it before, then that bit of code -- as "empty" as it might be -- would invariably be inserted on the same page as the full-page image, and somehow screw that up. In that regard, would I be better off just using a combination of "befores" and "afters", depending on whether there's a full-page image before or after? |
08-28-2014, 01:30 PM | #35 | |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Quote:
But, on the other hand, the reason for having the dummy div is that you want to keep whatever top-margin you have defined, and not get it turned into 0. In your case you probably want 0 anyway, so maybe this is enough: Code:
<!--Chapter Title Page--> <div class="fullpage"> <img ... /> </div> <div class="pagebreak"/> <!--Chapter Text--> |
|
Advert | |
|
08-28-2014, 01:42 PM | #36 | |
Chief Bohemian Misfit
Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
Ah, okay. Well, I actually just finished re-doing every page (of relevance) in my whole book, using both "befores" and "afters", wherever was appropriate, and it seems to have worked out great with no problems, both in ADE and in iBooks, so I guess I'll just leave it at that. I think I need a nap now! Thanks so much once again, Jellby! |
|
08-28-2014, 02:00 PM | #37 | |
Grand Sorcerer
Posts: 11,470
Karma: 13095790
Join Date: Aug 2007
Location: Grass Valley, CA
Device: EB 1150, EZ Reader, Literati, iPad 2 & Air 2, iPhone 7
|
Quote:
Dale |
|
08-28-2014, 03:25 PM | #38 | |
Chief Bohemian Misfit
Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
Thanks for the follow-up, Dale! Good to know not to use the "after" one (for the sake of some older devices out there). |
|
08-28-2014, 11:46 PM | #39 | |
Zealot
Posts: 117
Karma: 584308
Join Date: Oct 2010
Location: San Francisco
Device: Kindle
|
Quote:
If you have oeb-column-number set globally in your CSS, then have your frontispiece and title page in one file and have that file set with <body style="oeb-column-number: 2">. The file setting will override the CSS. Or do it all at the file level so you always see what each page is doing. That is, do a search and replace and have all <body> changed to <body style="oeb-column-number: 1"> and then reset to 2 as needed. If I recall, this is a QT issue. Since you're using Sigil, you may want to use & #160; (close the gap in the code of course) instead of . The discussion about that is too long for me to recall what the problem was. Perhaps I'm mistaken and it's the other way around. Maybe someone can chime in on that. |
|
08-29-2014, 07:50 AM | #40 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Hmm... as pointed by davidfor in another thread, w3schools says about "page-break-after":
Note: You cannot use this property on an empty <div> or on absolutely positioned elements. I wonder where this comes from. I don't recall seeing anything about that in the spec, maybe it's just an oblique reference to the fact that some renderers (wrongly, as far as I know) discard empty elements. |
08-29-2014, 07:57 AM | #41 | |
Chief Bohemian Misfit
Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
|
|
08-29-2014, 08:02 AM | #42 | ||
Chief Bohemian Misfit
Posts: 571
Karma: 462964
Join Date: May 2013
Device: iPad, ADE
|
Quote:
Quote:
|
||
09-05-2014, 02:00 AM | #43 | ||
Curmudgeon
Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
Quote:
So the comment isn't quite right in that the spec provides no prohibition against using these properties with absolutely positioned elements, but fully compliant UAs are allowed to completely ignore them if you do. |
||
09-05-2014, 03:09 AM | #44 |
frumious Bandersnatch
Posts: 7,516
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Yeah, the "absolutely positioned elements" makes sense. Once you move an element out of the normal flow and place it on top of the page (say), you cannot ask for a pagebreak relative to this element.
Absolutely positioned elements are disencouraged in ePub 2 anyway. |
09-09-2014, 06:24 AM | #45 | |
Bookmaker & Cat Slave
Posts: 11,462
Karma: 158448243
Join Date: Apr 2010
Location: Phoenix, AZ
Device: K2, iPad, KFire, PPW, Voyage, NookColor. 2 Droid, Oasis, Boox Note2
|
Quote:
Any possibility that we can all agree that we should NOT be using "px" to set vertical whitespace elements? Ems or % would really, really work better. And all this, over the "blank page" (that doesn't exist), that's created, on the fly if/when the reader sizes the font in such a way, and uses font X instead of font y, and IF s/he has the iPad rotated to read in two-page/column mode...honestly, why all the drama? Here's the thing: no matter how typographically perfect we want to make our work, they are NOT. PRINT. Books. Trying to force two pages to be on the left- and right-hand "pages" of a reader that may/mayn't be rotated in landscape, may/mayn't have font X, etc....What happens if you have a sight-impaired user who cranks up the font size, with that 42px "top-margin?" what happens THEN? I am all for trying to make books as beautiful as possible, but sometimes, you can't work around certain things, like forcing readers to ONLY see a book in one-page mode. To me, that's the very definition of being anti-e-reader. What happens with that 42px top-margin/padding/whatever when this is purchased on an iPad mini or an iPhone? And when the ex libris overflows on the mini, what happens to that beautiful "two-page-spread" then? We can be as artistic as we want, but we also need to accept what eBooks do well, and what they do NOT. A lot of what gets talked about (page break here, page-break before:, page-break after, etc.) doesn't work on all readers. And the "extra page thing?" Again: it's only relevant when someone is reading in LANDSCAPE mode. You know how often I see someone reading in landscape mode? NEVER. I mean it: NEVER. It's time to embrace the GOOD, and learn to GRACEFULLY live with the other. Sorry to get off on a tear, but at the very least, let's try to avoid using PX for positioning in REFLOWABLE BOOKS. </rant> Hitch |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Blank pages | Sablerose | Marvin | 11 | 02-08-2014 09:06 AM |
PDF to EPUB adds extra blank lines ?? | Rojofo | Conversion | 3 | 06-01-2012 06:20 PM |
Blank Pages | PAULINE BIRCHNAL | Conversion | 5 | 01-02-2012 12:47 PM |
Troubleshooting one after another blank pages | monsterbadgog | Amazon Kindle | 0 | 02-20-2011 04:02 PM |
Blank pages | JSWolf | Calibre | 4 | 11-29-2008 01:22 PM |