This stylesheet will work for all EPUB eBooks. For the Kindle, please see below. Suggestions and feedback are always welcome.
@page {margin: 10px;}
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video
{
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
vertical-align: baseline;
}
table
{
border-collapse: collapse;
border-spacing: 0;
}
ol, ul, li, dl, dt, dd
{
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
vertical-align: baseline;
}
body
{
text-align: justify;
line-height: 120%;
}
h1
{
text-indent: 0;
text-align: center;
margin: 100px 0 0 0;
font-size: 2.0em;
font-weight: bold;
page-break-before: always;
line-height: 150%;
}
h2
{
text-indent: 0;
text-align: center;
margin: 50px 0 0 0;
font-size: 1.5em;
font-weight: bold;
page-break-before: always;
line-height: 135%;
}
h3
{
text-indent: 0;
text-align: left;
font-size: 1.4em;
font-weight: bold;
}
h4
{
text-indent: 0;
text-align: left;
font-size: 1.2em;
font-weight: bold;
}
h5
{
text-indent: 0;
text-align: left;
font-size: 1.1em;
font-weight: bold;
}
h6
{
text-indent: 0;
text-align: left;
font-size: 1.0em;
font-weight: bold;
}
h1, h2, h3, h4, h5, h6
{
-webkit-hyphens: none !important;
hyphens: none;
page-break-after: avoid;
page-break-inside: avoid;
}
p
{
text-indent: 1.25em;
margin: 0;
widows: 2;
orphans: 2;
}
p.centered
{
text-indent: 0;
margin: 1.0em 0 0 0;
text-align: center;
}
p.centeredbreak
{
text-indent: 0;
margin: 1.0em 0 1.0em 0;
text-align: center;
}
p.texttop
{
margin: 1.5em 0 0 0;
text-indent: 0;
}
p.clearit
{
clear: both;
}
p.toctext
{
margin: 0 0 0 1.5em;
text-indent: 0;
}
p.toctext2
{
margin: 0 0 0 2.5em;
text-indent: 0;
}
ul
{
margin: 1em 0 0 2em;
text-align: left;
}
ol
{
margin: 1em 0 0 2em;
text-align: left;
}
span.i
{
font-style: italic;
}
span.b
{
font-weight: bold;
}
span.u
{
text-decoration: underline;
}
span.st
{
text-decoration: line-through;
}
span.ib
{
font-style: italic;
font-weight: bold;
}
span.iu
{
font-style: italic;
text-decoration: underline;
}
span.bu
{
font-weight: bold;
text-decoration: underline;
}
span.ibu
{
font-style: italic;
font-weight: bold;
text-decoration: underline;
}
span.ipadcenterfix
{
text-align: center;
}
img
{
max-width: 100%;
}
table
{
margin: 1.0em auto;
}
tr, th, td
{
margin: 0;
padding: 2px;
border: 1px solid black;
font-size: 100%;
vertical-align: baseline;
}
.footnote
{
vertical-align: super;
font-size: 0.75em;
text-decoration: none;
}
span.dropcap {
font-size: 300%;
font-weight: bold;
height: 1em;
float: left;
margin: 0.3em 0.125em -0.4em 0.1em;
}
div.pullquote
{
margin: 2em 2em 0 2em;
text-align: left;
}
div.pullquote p
{
font-weight: bold;
font-style: italic;
}
div.pullquote hr
{
width: 100%;
margin: 0;
height: 3px;
color: #2E8DE0;
background-color: #2E8DE0;
border: 0;
}
div.blockquote
{
margin: 1em 1.5em 0 1.5em;
text-align: left;
font-size: 0.9em;
}