04-10-2009, 05:55 AM | #1 |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Another "glitch" of ADE
When I force a pagebreak after a particular element (with "page-break-after: always" CSS rule) it seems the next element's top margin is ignored, and it's rendered (by Adobe Digital Editions) at the top of the next page instead. So, for example:
[code]<div class="dedication">To my wife</div> <h1>Chapter 1</h1>[</code] if div.dedication has "page-break-after: always", there is, indeed a page break before Chapter 1, but the heading just ignores the "margin-top: 4em" in h1. Is this a "bug" in ADE or am I mistaken in my interpretation of how pagebreaks should work? Is there a simple workaround? Any Adobe employee reading this who could fix it? I guess the Sony readers will have the same behaviour, am I right? |
04-10-2009, 07:42 AM | #2 | ||
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
Quote:
Quote:
|
||
04-10-2009, 08:41 AM | #3 |
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Great... so how am I to have a forced page break without affecting vertical margins (short of splitting the text in two files)?
A dirty hack would be: Code:
<div style="page-break-before: always"> </div> |
04-10-2009, 09:44 AM | #4 | ||
frumious Bandersnatch
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
Hmm... and why doesn't this appear centered?
Quote:
Quote:
|
||
04-10-2009, 10:53 AM | #5 |
hopeless n00b
Posts: 5,111
Karma: 19597086
Join Date: Jan 2009
Location: in the middle of nowhere
Device: PW4, PW3, Libra H2O, iPad 10.5, iPad 11, iPad 12.9
|
Have you tried the following? Not sure if it'll work but it's worth a try. I recall playing with this the past weekend, but I don't have the relevant files in front of me now so I'll have to double-check when I get home.
CSS Code:
.story { page-break-before: always; } .chaptitle { margin-top: 4em; } Code:
<div class="dedication">To my wife</div> <div style="story"> <h1 class="chaptitle">Chapter 1</h1> <p>First chapter goes here.</p> </div> I've never had luck centering text within div. Try using: CSS Code:
.halftitle { font-style: italic; font-size: 120%; text-align: center; margin: 4em 0 4em 0; } Code:
<h1 class="halftitle"> Frankenhausen<br/> (1525) </h1> |
04-10-2009, 10:58 AM | #6 | |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
Quote:
Another option is to use padding instead of margins for vertical space you want to be preserved even on the box following a page break. |
|
04-10-2009, 11:01 AM | #7 |
Reticulator of Tharn
Posts: 618
Karma: 400000
Join Date: Jan 2007
Location: EST
Device: Sony PRS-505
|
I've definitely noticed some wackiness with how ADE handles centering. Double-check your text-indent to be safe? But if that is right, try fiddling with the whitespace within the element. It shouldn't affect how the positioning, but it seemingly does.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
"Settings," then "311" - Int'l Kindle searches for wireless providers in the area | Dr. Drib | Amazon Kindle | 2 | 08-28-2011 10:27 AM |
How can I authorize 2 "devices" in ADE with my Pocket Pro? | weeziepepper | Astak EZReader | 2 | 06-01-2010 11:22 PM |
Amazon geo restrictions suffer a "glitch" | Steven Lyle Jordan | News | 7 | 04-04-2010 09:51 AM |
"Protected Page" w/ADE on mac | lkodk | Sony Reader | 8 | 05-20-2009 05:12 PM |
"clock" issues with borrowed library books? and ADE ?? | GraceKrispy | Sony Reader | 5 | 01-08-2009 03:54 AM |