View Single Post
Old 05-23-2012, 06:04 AM   #4
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,550
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by DiapDealer View Post
CSS spacing before a heading (or any element) that's been assigned the "page-break-before" CSS directive will be ignored by ADE (or at least it won't render). This happens a lot when the epub consists of one single html document with page breaks assigned via CSS.
That's true, and it is an accepted (but optional) behaviour in the spec.

Quote:
In other words if you want spacing above the first item following a page break.. you need to physically start a new html file at that point. Otherwise, you won't be able to assign any spacing before that element.
There are other possible methods. Only margin is thrown away after a forced pagebrak. You can get space through padding, or by having the pagebreak in a previous element, like this:

Code:
<div class="pagebreak"/>

<h2>Chapter 5</h2>
where div.pagebreak has "page-break-before: always" and h2 has some top margin.

Whether this is possible to generate directly from ID, that's a different matter.
Jellby is offline   Reply With Quote