View Full Version : Best practices for margins


Mookiemon
07-19-2011, 12:48 PM
With several devices now allowing a person to adjust their margins to their liking, what is the best way to specify margin width in an epub? Books that I have bought (for Kobo) have a reasonable margin even when I set the margin width on my device to the minimum which makes me think they must have a margin width set within the epub. I can still make the margins larger if I want to though. However, when I set the side margins (to 5.0pt in the CSS styles) in an epub that I'm creating for a small publishing house, it seems to override any user option on the device - trying to make the margins wider on the Kobo doesn't work. In a nutshell, what I want to do is specify a small left and right margin in the epub so that text isn't right up against the edge on devices where the user can't over-ride margins, but on devices where a user can set their own margins, I would like them to be able to over-ride what I have specified. As I said, judging from some (DRMed) books I've bought, this should be possible. Thanks in advance for any suggestions.

DaleDe
07-19-2011, 05:00 PM
Kobo is somewhat unique in that it forces its own margins. Don't use this for a guide. Most readers do not let the user control margins so you should set a reasonable minimum if you need to although zero does work fine with most readers. Some readers do let the user control the margins. There is no standard here. Do not set huge margins because the screen is already pretty small.

charleski
07-19-2011, 05:08 PM
As a general guide, it's best to set the top and bottom margins in @page and the left and right margins in body, e.g.
@page { margin: 5pt 0}
body {margin: 0 12pt }
This will ensure your margins work properly on older readers that use a version of the Adobe RMSDK that displays page numbers in the right margin.

JSWolf
07-19-2011, 05:49 PM
Personally, I like no margins at all. The problem is that there is no one margin setting that will please everyone. Not everyone likes no margin.

But if you are going to use some margin, use a left/right margin and no top/bottom margin. This will do best on most readers.

Do you have access to an older Sony such as a 500 that's been upgraded to ePub, 505, 700, 600? If so, make it so the margin is as small as possible but that the text doesn't sit on the page number on the right side.

Toxaris
07-20-2011, 02:29 AM
As a general guide, it's best to set the top and bottom margins in @page and the left and right margins in body, e.g.
@page { margin: 5pt 0}
body {margin: 0 12pt }
This will ensure your margins work properly on older readers that use a version of the Adobe RMSDK that displays page numbers in the right margin.

Take care that the awful iBooks program on the iPad can't handle the @page. It will result in strange things, like not showing all pages.
Not that it stops me from using it though...

graycyn
07-20-2011, 12:54 PM
Since we are talking about margins, I have noticed on my Nook and Sony that if I make margin equal on left and right sides, there is always just a little more margin on the right.

I have been using the @page way of setting margins, but I've found that @page {margin: 6pt 6pt 0pt 8pt} actually centers better on my readers. (I also like a little top margin, especially on the Sony.)

I was wondering if this is true for all ADE supporting readers or just the models I happen to own, Nook original and Sony 950.

I suppose I should make the margins even, but as I'm making the epubs I'm making for myself, I figure I might as well please myself. Still, it just seemed odd that this happens.

JSWolf
07-21-2011, 05:32 AM
The reason for the slightly more margin on the right is because what ADE is doing is using the extra space to push a character there if it needs to so it doesn't have to drop the entire word to the next line. So justified is not fully flush right.

The nook original and the 950 are not using the latest ADE that supports hyphenation.

Jellby
07-23-2011, 01:57 PM
Personally, I try to put all margins (small) in @page, so I force the body with no margins:

html body { margin: 0 }

(This is body inside html, which has higher preference than just body, and appears to be necessary in the Cybooks, for instance.)

Then just add my desired margins with:

@page { margin: 2mm }

This, at least, is a single where margins can be tweaked by me or other readers. Eventually, I hope the reading devices will have a margins setting, so I can just put "margin: 0" everywhere.

graycyn
07-24-2011, 07:13 PM
The reason for the slightly more margin on the right is because what ADE is doing is using the extra space to push a character there if it needs to so it doesn't have to drop the entire word to the next line. So justified is not fully flush right.

The nook original and the 950 are not using the latest ADE that supports hyphenation.

Thanks, I thought it might be an ADE thing. I just saw the post about the new ADE 1.8... hyphenation support sounds like a good idea. I guess I'll just go with even margins and learn to live with it not looking quite right for now.