View Single Post
Old 05-08-2010, 08:37 PM   #9
charleski
Wizard
charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.charleski ought to be getting tired of karma fortunes by now.
 
Posts: 1,196
Karma: 1281258
Join Date: Sep 2009
Device: PRS-505
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:
Code:
<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.

Be aware that ADE seems to add a small top margin of its own (even with no top margin, there is still a small gap at the top) - this is on the PRS-505, other implementations may differ. I find a top margin of 9pt works well, and visually matches the 12pt right and left margins I use.
charleski is offline   Reply With Quote