View Single Post
Old 01-20-2010, 06:02 PM   #22
Valloric
Created Sigil, FlightCrew
Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.Valloric ought to be getting tired of karma fortunes by now.
 
Valloric's Avatar
 
Posts: 1,982
Karma: 350515
Join Date: Feb 2008
Device: Kobo Clara HD
Quote:
Originally Posted by akratic View Post
In particular, body { margin-left: 2em; margin-right: 2em; } is recommended, which will only add left and right margins. Extending this example to body { margin: 2em } doesn't work well either, adding top and bottom margins only to the entire book.

After a fair bit of searching on this forum, I discovered that a better approach for margins is: @page { margin: 2em; } which will add margins to every page of the book.
It's not really meant to be exhaustive, just an example. It's what I use, since I only ever add left and right margins.

The "@page" I agree with.

Quote:
Originally Posted by zelda_pinwheel View Post
to further expand on this point, i don't recommend using ems as the unit of measurement for margins, since that is a proportional unit (it is the width of the letter "m" in whatever font size you are using. if the font size itself is defined in ems, 1em is around 16pt). this means that if you enlarge the text, the margin will also be enlarged proportionally. it's better therefore either to use percentage
Good point. Again, I just listed what I use for my books since I practically never zoom in a book. But others will, so it should be changed.

Baah, now I have bugs in the documentation as well, as if those in the code weren't enough...
Valloric is offline