View Single Post
Old 12-28-2009, 07:59 AM   #180
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,563
Karma: 20150435
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by tompe View Post
Should that not be up to the renderer? Why do you need to specify something? If you have a status bar then tha page size is reduced and the renderer has to take that into account.
Let's see, I know the screen is 800x600, and so I use a 800x600 cover image, and set it to 100% width. It will take the whole screen, if the screen is in fact 800x600. But if you have a status bar making it only 780x600, the image is still 100% wide, and will extend beyond the bottom of the screen (or the status bar covers the bottom of the image, as you prefer). Since the image cannot react to the screen height, there's nothing the reader can do to "fix" this. It could automatically resize the image to fit the screen, as mobipocket does, but this is not a standard behaviour with ePUB.

A different issue is if, say, there is some text in a screen and then a image. If the text takes up 400px and then there comes an image 400px high, that's no problem without status bar, they fit in a 800px screen. But with a status bar, there is not enough space for the image, and it should be sent to the next page. If the reader does not do this and instead places the image in the same place covering it with the status bar, then it is a bug, indeed.

Quote:
Originally Posted by tompe View Post
But margins are specified in the css file and they seem to have effect. I am trying to see which specification cases the text to be placed to hight but it is hard to find it...
Top/bottom margins in the body element only affect the beginnig and end of the element, not the top and bottom of each page. Top margins of other elements can be discarded at pagebreaks (which is sometimes good, and sometimes bad). If a pagebreak occurs in the middle of a paragraph, there's no top margin there.

Quote:
Originally Posted by srml View Post
What about "@page { margin-top: xxx; margin-bottom: yyy }"? That works for me and I think it's standards compliant.
Hmm... I didn't know about that. In the OPS spec I had previous read it as if the margins are not supported by @page, but now I think they are. I shall make some experiments there...

But I still think the margins should be something settable by the user, and not hard-coded in the ePUB book. Anyway, the reader has some default right and left margins, doesn't it? then it should also have some sensible top and bottom margins (maybe they thought 0pt was a sensible default top margin, though).
Jellby is offline   Reply With Quote