Quote:
Originally Posted by Agama
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.)
|
That's very much incorrect. Putting the margins in the body will work for all of the XML files in the ePub. So if I was to set the top & bottom to 5em, it would be that way throughout every XML as long as they were not overridden.
True that you can just use @page. But you also want the actual margins set to 0 in body in that case.