Quote:
Originally Posted by Toxaris
Actually, he is right.
|
Quote:
Originally Posted by Jellby
Sure, for each XHTML file, but not for each screen/page in them. Since the flow is defined to go vertically (i.e., next and previous pages are virtually above and below the current screen), left and right margins in <body> work as expected, and are valid for all the pages. But once one puts top and bottom margins in @page (where they belong), why not put left and right too (where, it can be argued, they belong as well) and leave the <body> with plain "margin: 0; padding: 0"?
|
Thank-you. I know it's correct because I fell foul of it in practise. I think that JSWolf misunderstood me, perhaps because it's hard to explain clearly. It's easier to understand the difference when you see it happening!
I should have said:
If set in body then margins only apply to the top and bottom of each XHTML file being rendered, (typically a chapter), and NOT to the screen of the device.
So, top/bottom margins defined in body css are only seen when the top or bottom of an XHTML document is visible. Solution: define them in @page.
I would agree that all these margins should be in @page with one exception. Old readers like my PRS-300 display horrible ADE page numbers down the right margin. Using margin-right in @page causes these numbers to appear further left, (which is more obtrusive), whereas in body it does not - it just margins the page text. So specifying in body gives a way of stopping these numbers from overlapping text. There is no option in the firmware to switch them off, but I have read that subsequent Sony readers do not have them.