|
|
Thread Tools | Search this Thread |
04-16-2017, 01:16 AM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Google Play Books
|
Epub formatting, keep text, padding and borders from getting cut between screens
I'm auto generating the epub(in calibre, from odf, with the intended reader being google play books, and yes i know they do a bunch of crazy stuff to it in the backend) so there is not much if anything i can do with the html format since there will be thousands of occurrences between a few hundred different files through out the book, the intended look is a video-game popup box, but iv'e been stuck keeping the text, padding, border and fill from splitting between pages, this is for personal use only so the fix doesn't have to be elegant or cross-platform just work in google play books, and be a css only edit.
anyone have a clue? thanks for any help that can be given. things iv'e tried page-break-inline:avoid; break-inline:avoid; html Code:
<p class="p-pb">some text</p> Code:
.p-pb { background-color: #113166; display: block; font-family: "Liberation Serif", serif; font-size: 1em; font-weight: bold; line-height: 120%; text-align: center; color: white; margin: auto; padding: 0.4in; border: #0986ed solid 4pt; border-radius: 7px; } |
04-17-2017, 01:31 AM | #2 |
Obsessively Dedicated...
Posts: 3,200
Karma: 34978132
Join Date: May 2011
Location: JAPAN (US expatriate)
Device: Sony PRS-T2, ADE on PC
|
page-break-inline:avoid;
I think you mean page-break-inside:avoid; Some reader software and devices don't honor page-break-inside: avoid, although they mostly do ok with page-break-before:always and page-break-after:always. But try adding that to your .p-pb class, and see if it helps. It does sound unusual, though, that your paragraph is splitting before the bottom border. I don't know if border-radius is allowed in epub --- what happens if you remove that from your css class? |
Advert | |
|
04-17-2017, 04:48 PM | #3 |
Well trained by Cats
Posts: 30,409
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
.8in in padding (top+Bottom)
Why are you wasting my (or any customers) screen space . Not everyone has (or wants) a 10" tablet to read upon. Not only that, inch is an absolute size, not proportional like em or % |
04-17-2017, 09:09 PM | #4 |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Google Play Books
|
well it work's fine for what i'm doing(on a 11." tablet that i read on), and this is translated webnovels from china, japan, korea ect.. i have zero rights to resell or even distribute, this is entirely for personal use
|
04-17-2017, 09:21 PM | #5 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Google Play Books
|
Quote:
anyhow editing the page break before or after the element i not a option, since there is no standard distribution, and the only other option would be to break both before and after and i would rather just deal with the splits between pages then only have sometimes a single line of text on the whole screen. boarder-radius works fine(at least in google play books app, surprisingly not the web-view on desktop but its of little consequence) why padding,is split between pages i couldn't tell you on the other hand, the boarder is just a consequence of the padding splitting between pages, i blame it on issues with google play books, i am honestly willing to deal with the issues since the platform is well suited to my purpose(holding a library of personal use self made book while tracking last page read) i have over 350, 300-800 page epubs(according to googles page count) and it possible to redownload them all via google takeout, but the platform would have to be inciting |
|
Advert | |
|
04-17-2017, 10:13 PM | #6 |
Well trained by Cats
Posts: 30,409
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
The entire block must fit in the (body) space assigned or it must split.
Boxes within boxes. I avoid bottom margins, because those can force a blank 'page', even though the paragraph WORDS fit. |
04-17-2017, 10:37 PM | #7 | |
Junior Member
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Google Play Books
|
Quote:
as far as using bottom margins, i had noticed that i from time to time had a blank page at the end of a chapter, never looked into it since it was a minor problem, but it's not a huge issue to edit my scripts and styling to use top margin. Last edited by hoodyRacoon; 04-17-2017 at 10:42 PM. |
|
04-30-2017, 06:36 AM | #8 |
Resident Curmudgeon
Posts: 76,055
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
The original CSS.
Code:
.p-pb { background-color: #113166; display: block; font-family: "Liberation Serif", serif; font-size: 1em; font-weight: bold; line-height: 120%; text-align: center; color: white; margin: auto; padding: 0.4in; border: #0986ed solid 4pt; border-radius: 7px; } Code:
.p-pb { background-color: #113166; display: block; font-weight: bold; line-height: 1.2; text-align: center; color: white; border: #0986ed solid 4pt; border-radius: 7px; } Last edited by JSWolf; 04-30-2017 at 12:42 PM. |
04-30-2017, 11:15 AM | #9 |
Well trained by Cats
Posts: 30,409
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Code:
line-height: 1.2 |
04-30-2017, 12:43 PM | #10 |
Resident Curmudgeon
Posts: 76,055
Karma: 134368292
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
05-01-2017, 01:29 AM | #11 |
Well trained by Cats
Posts: 30,409
Karma: 58055234
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
|
Tags |
epub, epub 3, google play books, help needed |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Converting epub to text/then copying without formatting | trianglekitty | Conversion | 3 | 05-09-2014 08:41 AM |
EPUB Formatting Challenge: Embedding blog posts in the flow of story text | Morganucopia | ePub | 18 | 08-02-2013 04:47 PM |
Formatting folders...character cut-off issues? | trianglekitty | Library Management | 0 | 07-30-2012 08:11 PM |
fb2 to epub wrong text formatting | rulet | Conversion | 3 | 03-30-2012 02:09 PM |
epub to mobi - padding right not working | 1611mac | Conversion | 3 | 11-12-2011 04:10 PM |