Quote:
Originally Posted by JSWolf
This is the cleaned up code...
Code:
body {
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
}
|
margin-top and
margin-bottom can be better in the
@page declaration rather than in
body.
The difference is subtle but significant:
If set in
body then margins only apply to the top and bottom of the text file being rendered, (typically a chapter), and NOT to the screen of the device. This means that if the text is longer than one screenful on the device, (and a chapter usually is), then you'll lose top margin as you forward through the chapter and the bottom margin will only show once the end of the chapter is displayed.
So if you want the vertical margins to persist as you scroll/page through a chapter then use
@page for top/bottom.
(I think that this may also be why calibre uses @page in this way on conversions.)