PDA

View Full Version : Tearing out my hair because of right margins.



rosehips
03-27-2011, 03:54 AM
Hi everyone. I am currently about two seconds away from publishing to Kindle... except I'm not. Because when I look at the Kindle preview, my text has a nice left margin but runs right up against the right boundary of the pretend Kindle. It looks bad. It looks like the text is off-center.

I used Guido Henkel's guide and put together the html file. I pretty much copied and pasted everything he posted, code-wise. So I don't understand why this is happening, or how to fix it. Here's the code at the top of my document:



<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<head>
<style type="text/css">
html, body, div, h1, h2, h3, h4, h5, h6, ul, ol, dl, li, dt, dd, p, pre, table, th, td, tr { margin: 0; padding: 0.1em; }
p
{
text-indent: 1.5em;
margin-bottom: 0.2em;
}
p.chapter
{
text-indent: 0em;
font-weight: bold;
font-size: 1.5em;
page-break-before: always;
margin-top:5em;
margin-bottom:2em;
}
p.title
{
text-indent: 0em;
text-align: center;
font-weight: bold;
font-size: 2.5em;
margin-top: 1em;
margin-bottom: 2em;
}
p.author
{
text-indent: 0em;
text-align: center;
font-weight: bold;
font-size: 1.5em;
margin-top: 0em;
margin-bottom: 5em;
}
p.centered
{
text-indent: 0em;
text-align: center;
}
span.centered
{
text-indent: 0em;
text-align: center;
}
</style>
</head>
<body>



Please, I beg you, help! I am *dying* to publish this book on Kindle. I am *so* excited. I have spent all day on the conversion to MOBI, and this wall I'm hitting is making a dent in my head.

thothguard51
03-27-2011, 04:29 AM
Why do you have the text aligned in center, that may be the problem...?

rosehips
03-27-2011, 05:00 AM
Hi Thoth,
It should only be aligned center specifically for "title" and "author" paragraphs, not the rest of the text. And so far, the rest of the test isn't aligning center, it's just butting up against the right side (although it's not right justified, either). It really just looks like there is a left margin but no right margin.
Thanks for being the first to respond! I want to understand what I'm doing wrong here.

thothguard51
03-27-2011, 05:27 AM
I missed that. Hmmm,

For a submission to Double Dragon, they ask that you make sure there are no extra spaces at the end of any typed line because it causes problems during the transition process to e format.

Could your document be the issue...?

rosehips
03-27-2011, 05:31 AM
Quite probably... I think I often do have an extra space at the end of some paragraphs. You know, I'll decide a long paragraph needs a paragraph break in it, so I'll click right before the first letter of a sentence and hit enter, leaving a space behind.

Could that be it?
How on earth do I kill those?

thothguard51
03-27-2011, 05:41 AM
Each line, not just the end of a paragraph...

Not saying this is the problem, but read the Double Dragon submission quidelines and you might get an idea for what is wrong if you are doing everything right on the formating guidelines for the Kindle...

http://www.double-dragon-ebooks.com/guidelines.php

But like I said, not sure this is the problem...

rosehips
03-27-2011, 10:10 PM
Guido Henkel emailed me and said Kindle doesn't handle padding well, so I just had to change it in the first line to read
padding: 0em; instead of
padding: 0.1em;.

AmsterdamAssassin
03-27-2011, 10:39 PM
Do you convert to .mobi by Calibre? If so:

Open Calibre and add ‘new book’

Edit Meta Data [Author Sort: Lastname, Firstname]
Comments: book description
insert cover

Convert Books
convert individually
Look & Feel: remove spacing Indent size 1,0em
Heuristic: Skip
Page setup: change all margins to 0,0pt
Structure Detection: Skip
TOC: Do not add detected chapters to TOC
Search and Replace: Skip
Mobi Output: Do Not Add TOC to book
OK

rosehips
03-28-2011, 05:44 PM
Yes, I did! Thank you, that's really good to know.