View Full Version : page break in epub on iPad


JoanneM
12-06-2011, 10:15 PM
Hi all. I have an epub which tests with no errors in Flightcrew, which shows fine on a Nook, but which loses the page breaks on an iPad. My css says, in part:

<style type="text/css">
h1 {font-weight: bold; text-align: center; text-indent: 0px}
h2 {text-align: center; text-indent: 0px; page-break-before:always}
h3 {text-align: center; text-indent: 0px}
</style>

I use h1 for the book title, h2 for new chapters, and h3 for headers I don't want a page break before.

eg.:

<h1><a id="title-page"/>Title Here</h1>
<p class="center">by</p>
<h3>Author Here</h3>
<h2><a id="TOC"/>Table of Contents</h2>
[and then the toc here]
<h2><a id="start"/>Chapter One</h2>

etc. Except in this case the "chapters" are poetry titles, as it's a book of poetry. I want each poem on its own page, naturally. Why would it look fine on a Nook but not on the iPad? Is there something I have to add for an iPad that won't insert extra page breaks on the Nook? Thanks, all!

Toxaris
12-07-2011, 02:22 AM
You could put each chapter in a new XHTML file. Otherwise it is probably another bug in iBooks. Or should I say ignoring the specifications in iBooks?

JSWolf
12-07-2011, 09:52 AM
http://www.pigsgourdsandwikis.com/2011/02/page-breaks-turning-off-hyphenation-and.html

Apple came out with version 1.2.1 of the iBooks app yesterday and though I haven't had a chance to look at it carefully, I have been hearing from Twitter that the page-break bug that I mentioned in Page Breaks in iBooks 1.2 —in which the CSS page-break properties had to be in a local stylesheet within the XHTML file instead of in an external CSS file—has been fixed. External CSS now works as it should. Yay.

But if it's not working, the best solution is to have separate XML files for each place where the break is suppose to happen. It's what I do and I don't have to worry about iBooks botching the page breaks.

st_albert
12-07-2011, 09:59 AM
http://www.pigsgourdsandwikis.com/2011/02/page-breaks-turning-off-hyphenation-and.html



But if it's not working, the best solution is to have separate XML files for each place where the break is suppose to happen. It's what I do and I don't have to worry about iBooks botching the page breaks.

IMHO this is the only reliable way to force a page break that works across all epub readers.