View Single Post
Old 10-15-2013, 08:01 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,556
Karma: 19500001
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by canpolat View Post
Code:
.page-break {
visibility:hidden;
page-break-before:always
}
"visibility" is not a required property in the ePub spec. I use simply an empty <div>:

Code:
<div class="pagebreak" />
<h1>My Title</h1>
Code:
div.pagebreak {
  height: 0;
  margin: 0;
  padding: 0;
  page-break-before: always;
}
(or <div class="pagebreak">&nbsp;</div> if the reader doesn't like empty elements).

Another solution is using padding instead of margin for the <h1> (if you don't have background or borders): unlike margin, padding is not discarded after a forced pagebreak.
Jellby is offline   Reply With Quote