View Single Post
Old 02-10-2011, 04:42 PM   #1
cybmole
Wizard
cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.cybmole ought to be getting tired of karma fortunes by now.
 
Posts: 3,720
Karma: 1759970
Join Date: Sep 2010
Device: none
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }

most - maybe all of my ebook conversions contain this line, before the html body
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }

is it put there by calibre ?

does it do what I think it does - i.e. force a top & bottom margin- if so can I override it with the extra CSS option rather than edit each books contents, so that I have no wasted white space at top / bottom when converted for Kindle ?, or is there a better way to countermand it please ?

PS - google found me this, in an old thread- does calibre still have no override or workaround ?

"Ah, the real problem here is one of calibre's slightly annoying quirks.

Calibre places an @page rule in the header of each html file, and this overrides any @page rule in the css.

The solution is to edit all your html files and remove the style that calibre has inserted at the top. It will look like this:

<style type="text/css">
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }</style>

Once this has gone, then you can control the top and bottom margins from the @page rule in the css file."

PPS I read elsewhere that Kindle ignores or does not support bottom margin - it that's true , then this becomes a question only about controlling top margin,
also ( running out of PPPS's here ) googling "@page rule" suggests that it only applies to printed paginated media, so what is the code for in an .epub ?, and is messing with it a pointless exercise for books destined for e-readers?

Last edited by cybmole; 02-10-2011 at 04:54 PM.
cybmole is offline   Reply With Quote