Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 02-02-2010, 09:13 PM   #1
jchrist
Junior Member
jchrist began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Feb 2010
Device: kindle
Wide left margins in epub to kindle conversion

Apologies if this is cross-posted, I'm still trying to figure out these forums.

I have the same problem as described in:

https://www.mobileread.com/forums/sho...336#post770336,

namely a wide left margin when converting an O'Reilly epub to mobi format
displayed on a kindle. Bug #1944 was opened and closed w/o a fix for this issue, and I'm not sure how to work around it.

The css used by my epub source book is quoted below. I've tried adding


* {
margin-left: 0px;
}

as the override css, and that didn't solve the problem either. What can I do to get rid of the wide left margin?

Thanks,
Jon

/* undo some of the default styling */

html, body, h1, h2, h3, h4, h5, h6, p, ol, ul, li, pre, code, address,
variable, form, fieldset, blockquote, a {
padding: 0;
margin: 0;
font-size: 100%;
}

table {
border-collapse: collapse;
border-spacing: 0;
}

td, th, caption {
font-weight: normal;
text-align: left !important;
}

img, fieldset {
border: 0;
}

ol {
padding-left: 0.75em;
list-style: decimal;
}

ul {
padding-left: 0.75em;
list-style: square;
}

q:before, q:after {
content:'';
}

/* don't show the toc */

.toc { display: none; }

/* p margin */

p {
margin: 10px;
}

/* inlines */

em {
font-style: italic;
font-family: "DejaVu Serif Italic", serif;
}

strong {
font-weight: bold;
font-family: "DejaVu Serif Bold", serif;
}

strong em, em strong, h1 em, h2 em, h3 em, h4 em {
font-weight: bold;
font-style: italic;
font-family: "DejaVu Serif Bold Italic", serif;
}

code strong em, code em strong {
font-weight: bold;
font-style: italic;
font-family: "DejaVu Sans Mono Bold Oblique", monospace;
}

code em, em code, pre em {
font-family: "DejaVu Sans Mono Oblique", monospace;
font-style: italic;
}

code strong, strong code, pre strong {
font-family: "DejaVu Sans Mono Bold", monospace;
font-weight: bold;
}

code {
font-family: "DejaVu Sans Mono", monospace;
}

pre {
white-space: pre-wrap;
font-family: "DejaVu Sans Mono", monospace;
font-size: 85%;
margin-left: 20px;
margin-bottom: 10px;
}

/* headings */

h1, h2, h3, h4, h5, h6 {
margin-left: 10px;
text-align: left !important;
page-break-inside: avoid;
page-break-after: avoid;
font-weight: bold;
display: block;
}

h1 {
margin-top: 0.75em;
margin-bottom: 0.50em;
font-size: 1.5em;
}

h2 {
margin-top: 0.75em;
margin-bottom: 0.30em;
font-size: 1.3em;
}

h3 {
font-size: 1.1em;
margin-top: 0.50em;
margin-bottom: 0.50em;
}

h4 {
font-size: 1em;
margin-top: 0.30em;
margin-bottom: 0.30em;
font-style: italic;
}

h5 {
font-size: 1em;
font-style: italic;
}

h6 {
font-size: 1em;
font-style: italic;
}

/* images */

img {
max-width: 100%;
margin-left: auto;
margin-right: auto;
}

.mediaobject {
width: 99%;
}

.figure-contents {
page-break-after: avoid;
page-break-inside: avoid;
padding-bottom: 0.10em;
text-align: center;
}

.figure {
background: #F5F5F5;
page-break-inside: avoid;
padding: 5px;
text-align: center;
}

.figure .title {
page-break-before: avoid;
margin: 0;
text-align: center;
font-weight: normal;
font-style: italic;
font-family: "DejaVu Serif Italic", serif;
}

/* sidebars */

.sidebar {
border: solid black 2px;
background-color: #F5F5F5;
margin: 10px 5px 10px 5px;
}

.sidebar > * {
padding-left: 5px;
padding-right: 5px;
}

/* blocks */

.title {
font-family: sans-serif;
font-weight: bold;
}

.author h3 {
font-family: sans-serif;
font-size: 1em;
margin-left: 15px;
}

.editor h3 {
font-family: sans-serif;
font-size: 1em;
margin-left: 15px;
}

.editor h4 {
font-style: normal;
font-weight: normal;
}

.affiliation {
margin-left: 20px;
font-size: smaller;
}

.blockquote {
margin: 10px;
}

/* lists */

dt {
margin-left: 0.50em;
}

dd {
margin-left: 1em;
}

ul, ol {
margin-left: 1.25em;
}

.simplelist {
margin-left: 1.5em;
}

/* examples */

.example .title {
font-weight: normal;
font-style: italic;
font-family: "DejaVu Serif Italic", serif;
page-break-after: avoid;
}

.example {
background-color: #F5F5F5;
}

/* notes, tips, warnings */

.tip, .note {
width: 95%;
text-align: left !important;
margin: 10px;
page-break-inside: avoid;
border: dashed black 1px;
background-color: #F5F5F5;
}

.warning, .caution {
width: 95%;
text-align: left !important;
margin: 10px;
page-break-inside: avoid;
border: double black 4px;
background-color: #F5F5F5;
}

dd .note, dd, .tip, dd .warning, dd .caution {
margin: 0.50em 0 0.50em 1.25em;
}

.tip > *, .warning > *, .note > *, .caution > * {
padding-left: 5px;
padding-right: 5px;
}

.note h3, .warning h3, .tip h3, .caution h3 {
text-align: left !important;
page-break-after: avoid;
}

/* tables */

.table th, .informaltable th {
background-color: #F5F5F5;
border: black 1px solid;
font-weight: bold;
font-family: sans-serif;
font-size: smaller;
padding: 0.25em;
margin: 0;
}

.table td, .informaltable td {
border: black 1px solid;
padding: 0.25em;
margin: 0;
border-spacing: 0;
font-size: smaller;
}

.table .title {
font-size: medium;
font-weight: normal;
font-style: italic;
font-family: "DejaVu Serif Italic", serif;
page-break-after: avoid;
margin-bottom: 0.50em;
margin-left: 0;
}

.table code, .informaltable code {
font-size: x-small;
}

.table, .informaltable {
margin-top: 0.75em;
max-width: 100%;
margin-left: 10px;
}

/* Syntax highlighting */
code.boolean {
color: rgb(0,0,128); /* navy */
}
code.character {
color: rgb(128,128,0); /* olive */
}
code.comment {
color: rgb(0,0,255); /* blue */
}
code.conditional {
color: rgb(50,205,50); /* limegreen */
}
code.constant {
color: rgb(255,140,0); /* darkorange */
}
code.debug {
color: rgb(139,0,0); /* darkred */
}
code.define {
color: rgb(184,134,11); /* darkgoldenrod */
}
code.delimiter {
color: rgb(105,105,105); /* dimgray */
}
code.error {
color: rgb(255,0,0); /* red */
}
code.exception {
color: rgb(250,128,11); /* salmon */
}
code.float {
color: rgb(70,130,180); /* steelblue */
}
code.function {
color: rgb(0,128,0); /* green */
}
code.identifier {
color: rgb(65,105,225); /* royalblue */
}
code.ignore {
color: rgb(128,128,128); /* gray */
}
code.include {
color: rgb(128,0,128); /* purple */
}
code.keyword {
color: rgb(160,82,45); /* sienna */
}
code.label {
color: rgb(255,20,147); /* deeppink */
}
code.macro {
color: rgb(255,69,0); /* orangered */
}
code.number {
color: rgb(165,42,42); /* brown */
}
code.operator {
color: black; /* black */
}
code.preCondit {
color: rgb(0,128,128); /* teal */
}
code.preProc {
color: rgb(255,0,255); /* fuscia */
}
code.repeat {
color: rgb(75,0,130); /* indigo */
}
code.special {
color: rgb(139,69,19); /* saddlebrown */
}
code.specialchar {
color: rgb(255,0,255); /* magenta */
}
code.specialcomment {
color: rgb(46,139,87); /* seagreen */
}
code.statement {
color: rgb(34,139,34); /* forestgreen */
}
code.storageclass {
color: rgb(221,160,221); /* plum */
}
code.string {
color: rgb(139,0,0); /* darkred */
}
code.structure {
color: rgb(210,106,30); /* chocolate */
}
code.tag {
color: rgb(0,139,139); /* darkcyan */
}
code.todo {
color: black; /* black */
}
code.type {
color: rgb(123,104,238); /* mediumslateblue */
}
code.typedef {
color: rgb(0,100,0); /* darkgreen */
}
code.underlined {
text-decoration: underline; /* guess what */
}

/* fonts (keep at bottom) */

@font-face {
font-family: "DejaVu Serif";
font-style: normal;
font-weight: normal;
src: url(DejaVuSerif.otf);
}

@font-face {
font-family: "DejaVu Serif Bold";
font-weight: bold;
font-style: normal;
src: url(DejaVuSerif-Bold.otf);
}

@font-face {
font-family: "DejaVu Serif Italic";
font-weight: normal;
font-style: italic;
src: url(DejaVuSerif-Italic.otf);
}

@font-face {
font-family: "DejaVu Serif Bold Italic";
font-weight: bold;
font-style: italic;
src: url(DejaVuSerif-BoldItalic.otf);
}

@font-face {
font-family: "DejaVu Sans Mono";
font-weight: normal;
font-style: normal;
src: url(DejaVuSansMono.otf);
}

@font-face {
font-family: "DejaVu Sans Mono Bold";
font-weight: bold;
font-style: normal;
src: url(DejaVuSansMono-Bold.otf);
}

@font-face {
font-family: "DejaVu Sans Mono Oblique";
font-weight: normal;
font-style: italic;
src: url(DejaVuSansMono-Oblique.otf);
}

@font-face {
font-family: "DejaVu Sans Mono Bold Oblique";
font-weight: bold;
font-style: italic;
src: url(DejaVuSansMono-BoldOblique.otf);
}

/* keep this body statement last */

body {
font-family: "DejaVu Serif", serif;
}
jchrist is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[Old Thread] Convert epub to mobi with wide left margin on Kindle victoria0217 Conversion 91 11-15-2011 05:25 PM
EPub>Mobi>Kindle 3 large left margins Zenthor Calibre 14 11-02-2010 08:37 AM
Wide margins J. Strnad Kobo Reader 10 08-23-2010 10:58 PM
Wide margins in html to epub; font size mngmt; PDF metadata dementrio Calibre 2 08-01-2009 01:33 AM
Wide margins on Mobileread JayCeeEll Feedback 14 09-04-2008 12:45 PM


All times are GMT -4. The time now is 07:35 PM.


MobileRead.com is a privately owned, operated and funded community.