![]() |
#1 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Do you use page-break-after and page-break-inside?
I have used the following lines of CSS code in my EPUB:
Code:
h2, h3, h4, h5, h6 { page-break-inside: avoid; page-break-after: avoid; } It would be interesting to hear your opinions. Should I not use this code? Can it cause problems? Is it well supported? Another question . . . Do you guys switch off hyphenation? |
![]() |
![]() |
![]() |
#2 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,762
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
|
Quote:
And regarding hyphenation, I disable it for <h> tags. |
|
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 4,520
Karma: 121692313
Join Date: Oct 2009
Location: Heemskerk, NL
Device: PRS-T1, Kobo Touch, Kobo Aura
|
Most readers will ignore it though, even if they use RMSDK.
|
![]() |
![]() |
![]() |
#4 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Having those in there, on the other hand, shouldn't be a problem. A compliant reader/app should gracefully degrade...meaning if it doesn't understand or support a css command it shouldn't break. If your app is breaking over the code then that should be reported as a bug.
|
![]() |
![]() |
![]() |
#5 |
Enthusiast
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 38
Karma: 342440
Join Date: Apr 2017
Device: Sigil
|
Thanks, guys. I shall leave it in there. If I hear of any problems, then I'll remove it. I shall not switch off hyphenation, either.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
I have these lines in the CSS I use
.avoidbreak { page-break-inside: avoid; } .breakabove { page-break-before:always; } .breakafter { page-break-after:always; } and use them, nearly always as div classes, and find they work on my Sony T3, Kobo Glow, Kindle, iPad, and Samsung tablet. So far as I can tell they've always worked - e.g. a div with the class .breakabove always starts on a new page. Could you tell me please how you turn off hyphenation? That would be really useful for long titles if it stops a word from breaking. |
![]() |
![]() |
![]() |
#7 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
Code:
-moz-hyphens: none; -ms-hyphens: none; -webkit-hyphens: none; hyphens: none; |
|
![]() |
![]() |
![]() |
#8 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
|
|
![]() |
![]() |
![]() |
#9 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,740
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
![]() Also, for Sony you have to mention which model as up until the T3, there was no hyphenation and thus, they had gaps in some lines when full justified. So they didn't always look good. |
|
![]() |
![]() |
![]() |
#10 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 79,740
Karma: 145864619
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#11 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
You can fine tune these commands to only turn off hyphenation for certain parts...just put the tags in the appropriate CSS. Of course, the reader/app may completely ignore it anyway.... Last edited by Turtle91; 05-17-2017 at 09:52 AM. |
|
![]() |
![]() |
![]() |
#12 | |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,347
Karma: 20171571
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Quote:
![]() |
|
![]() |
![]() |
![]() |
#13 | |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,413
Karma: 13369310
Join Date: May 2008
Location: Launceston, Tasmania
Device: Sony PRS T3, Kobo Glo, Kindle Touch, iPad, Samsung SB 2 tablet
|
Quote:
I use iBooks and Bluefire Reader to test ebooks on my iPad, and they both seem to have wider 'pages' with more words per line for similar font sizes than by Sony and Kobo do. |
|
![]() |
![]() |
![]() |
#14 | |
Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 629
Karma: 1623086
Join Date: Jan 2012
Device: iPad, iPhone, Nook Simple Touch
|
Quote:
On the flip side, page-break-after: is almost guaranteed to be completely ignored unless the value is always. There may be certain situations where it works with avoid, but you're probably just wasting bytes. |
|
![]() |
![]() |
![]() |
#15 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,821
Karma: 19162882
Join Date: Nov 2012
Location: Te Riu-a-Māui
Device: Kobo Glo
|
In my experience page-break-after: avoid; has always worked perfectly in the Kobo (Adobe RMSDK 10 based) ePub reader.
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
page-break-inside on Google Play Books | Oxford-eBooks | ePub | 10 | 07-01-2015 12:17 AM |
Keeping text together (block vs. page-break-inside:avoid) | Psymon | ePub | 2 | 10-12-2014 09:56 AM |
iPad iBooks: page-break-after/inside/before NOT working? | philx | Apple Devices | 7 | 01-27-2013 12:42 AM |
Page-Break-Inside: Avoid - Solution or Hack? | sab1234 | Kindle Formats | 3 | 01-17-2013 04:10 PM |
Page-break-inside:avoid and mobi | AlexBell | Kindle Formats | 3 | 06-01-2011 06:03 AM |