Thread: <body> style
View Single Post
Old 03-28-2013, 10:14 PM   #2
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 74,037
Karma: 129333114
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by HYPE View Post
Hi there.

I'm currently working on a few ebooks. The creation process of most of them included converting from another format, so I didn't write all the CSS manually.

I noticed the following code in the CSS :

Code:
@page { margin-bottom: 5.000000pt; margin-top: 5.000000pt; }

body {
    display: block;
    font-size: 1em;
    margin-bottom: 0;
    margin-left: 5pt;
    margin-right: 5pt;
    margin-top: 0;
    padding-left: 0;
    padding-right: 0;
}
Is all of this really necessary? What should I use for the body? I really want to give people a clean ebook, so every detail is important to me.

Thanks.
This is the cleaned up code...

Code:
body {
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
margin-top: 0;
}
I would add in widows: 0; and orphans: 0; to make the text end mostly at the same place at the bottom of the screen.

Now, if you want to have margins, use an @page to do so. But if you do so, don't add in a bottom margin. You don't need it.
JSWolf is offline   Reply With Quote