View Single Post
Old 08-29-2012, 04:22 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: 73,983
Karma: 128903378
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Let's start off with the two most important styles in the CSS...

Code:
body {
widows: 0;
orphans: 0;
margin-top: 0;
margin-bottom: 0;
margin-left: 0;
margin-right: 0;
text-align: justify
}
p {
margin-top: 0;
margin-bottom: 0;
text-align: justify;
text-indent: 1.2em
}
Now for some other very useful styles...

Code:
.noindent {
text-indent: 0
}
.spacebreak {
margin-top: 2em;
text-indent: 0
}
noindent is for when you want a paragraph to start without an indent.
spacebreak is for section breaks.

These 4 styles will cover most of what you need in an eBook.

If you want margins, my suggestion is to leave the margins in the styles at 0 and use an @page to set margins such as...

Code:
@page {
margin-top: 7pt;
margin-left: 7pt;
margin-right: 7pt;
margin-bottom: 0
}

Last edited by JSWolf; 08-29-2012 at 04:25 PM.
JSWolf is offline   Reply With Quote