View Full Version : Classic epub Margins on nook


Trubu
12-12-2009, 10:10 PM
I was testing some of my own epub files (created with Sigil) on the nook, and noticed that, unlike the Kindle, the nook doesn't automatically add margins around the edge of the page. The end result is that text stretches clear out to the left and right edge of the screen, and also butts right up against the top menubar. The left and right margins should be easy enough to fix with a CSS rule, but I'm not sure how to handle the spacing at the top - there's no element I could easily target with CSS.

Anyone seeing similar problems with user-created epubs?

LoganK
12-14-2009, 01:31 AM
Have you tried:

body { margin: 5px; }

?

afv011
12-14-2009, 11:36 AM
Have you tried:

body { margin: 5px; }

?

Another option, which I use, is

@page { margin-top: 3px; margin-left: 2px; margin-right: 2px; margin-bottom: 0px; }

I find that I do not need any margin on the bottom as the nook seems to leave some there.

Steven Lyle Jordan
12-14-2009, 12:21 PM
Another option, which I use, is

@page { margin-top: 3px; margin-left: 2px; margin-right: 2px; margin-bottom: 0px; }

I find that I do not need any margin on the bottom as the nook seems to leave some there.

Are either of these solutions tested as standards-compliant, and do they produce the same results on all ePub readers?

LoganK
12-14-2009, 12:47 PM
Are either of these solutions tested as standards-compliant, and do they produce the same results on all ePub readers?

Both are standards compliant, but I have tested my changes in only a couple of readers. Technically, the @page context rule is more accurate, but I didn't suggest it because I don't know about support.

Apparently @page works on the nook, though, so, at a minimum, it solves this Trubu's problem.

Trubu
12-14-2009, 02:15 PM
Thanks all. I didn't know about the @page selector - sounds like that will do what I need. I'll give it a try tonight.

Trubu
12-14-2009, 11:03 PM
Just wanted to say thanks again - setting a page rule did the trick. Makes my side-loaded content a lot more pleasing to the eye.