View Single Post
Old 06-16-2015, 03:27 PM   #4
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,827
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Oxford-eBooks View Post
Has anyone found issues with page-break-inside:avoid in Google Play Books?
I've tried this on my Sony Z1 and the Windows 8 version with the same effect (oh, hats off to GBP for syncing the file I opened for test on both apps!)

The book I'm working on really needs to keep H1, H2 etc together with the following text - well, it should anyway to look good. I've got page-break-after:avoid inside my H classes and also have tried the old DIV around the stuff to keep together and page-break-inside:avoid trick, but it's being ignored. I put a pink background in the grouping DIV to check, and I can clearly see them spanning pages where they ought to be bumped to the next page.

All the other (good) readers are fine and dandy with this except GPB. This is a shame, cos I really want this to work on GPB. This book is going to go up on Google Play by the publisher and they don't want to have their audience fiddling about copying ACSM files to other readers and the like.
Don't use "page-break-inside: avoid" but "page-break-after: avoid" with <h> tags. The easiest way to do that is to write in your css stylesheet the following:

Code:
h1, h2 {
     page-break-after: avoid;
}
ADE (even ADE 2 and ADE 3) will respect that property but only for epub2 ebooks. Also ADE will respect orphans and widows properties but I don't know why ADE 4 —for epub3 ebooks— it doesn't respect those properties
RbnJrg is offline   Reply With Quote