Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 04-16-2017, 01:16 AM   #1
hoodyRacoon
Junior Member
hoodyRacoon began at the beginning.
 
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>
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;
}
hoodyRacoon is offline   Reply With Quote
Old 04-17-2017, 01:31 AM   #2
GrannyGrump
Obsessively Dedicated...
GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.GrannyGrump ought to be getting tired of karma fortunes by now.
 
GrannyGrump's Avatar
 
Posts: 3,200
Karma: 34977896
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?
GrannyGrump is offline   Reply With Quote
Advert
Old 04-17-2017, 04:48 PM   #3
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
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 %
theducks is offline   Reply With Quote
Old 04-17-2017, 09:09 PM   #4
hoodyRacoon
Junior Member
hoodyRacoon began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Google Play Books
Quote:
Originally Posted by theducks View Post
.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 %
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
hoodyRacoon is offline   Reply With Quote
Old 04-17-2017, 09:21 PM   #5
hoodyRacoon
Junior Member
hoodyRacoon began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Google Play Books
Quote:
Originally Posted by GrannyGrump View Post
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?
meant inside sorry - mistyped,

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
hoodyRacoon is offline   Reply With Quote
Advert
Old 04-17-2017, 10:13 PM   #6
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
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.
theducks is offline   Reply With Quote
Old 04-17-2017, 10:37 PM   #7
hoodyRacoon
Junior Member
hoodyRacoon began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Apr 2017
Device: Google Play Books
Quote:
Originally Posted by theducks View Post
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.
it was splinting on even two line paragraphs, and overflowing to the next page with only one, but i understand that "avoid" just means only do it if possible,

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.
hoodyRacoon is offline   Reply With Quote
Old 04-30-2017, 06:36 AM   #8
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
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;
}
The new CSS

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.
JSWolf is offline   Reply With Quote
Old 04-30-2017, 11:15 AM   #9
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
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
there should be no units for this
theducks is offline   Reply With Quote
Old 04-30-2017, 12:43 PM   #10
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,015
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by theducks View Post

Code:
line-height: 1.2
there should be no units for this
Thanks for catching that. I've edited the post to fix the mistake.
JSWolf is offline   Reply With Quote
Old 05-01-2017, 01:29 AM   #11
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,809
Karma: 54830978
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by JSWolf View Post
Thanks for catching that. I've edited the post to fix the mistake.
That is why writers need proof readers
We all fumble sometime
theducks is offline   Reply With Quote
Reply

Tags
epub, epub 3, google play books, help needed


Forum Jump

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


All times are GMT -4. The time now is 03:08 PM.


MobileRead.com is a privately owned, operated and funded community.