Tearing out my hair because of right margins.

rosehips

Mr. Boo is watching you.
Super Member
Registered
Joined
Feb 14, 2011
Messages
808
Reaction score
58
Location
Burgundy, France
Website
www.upwork.com
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:

HTML:
<?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.
 

rosehips

Mr. Boo is watching you.
Super Member
Registered
Joined
Feb 14, 2011
Messages
808
Reaction score
58
Location
Burgundy, France
Website
www.upwork.com
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

A Gentleman of a refined age...
Super Member
Registered
Joined
Oct 16, 2009
Messages
9,316
Reaction score
1,064
Age
72
Location
Out side the beltway...
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

Mr. Boo is watching you.
Super Member
Registered
Joined
Feb 14, 2011
Messages
808
Reaction score
58
Location
Burgundy, France
Website
www.upwork.com
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

A Gentleman of a refined age...
Super Member
Registered
Joined
Oct 16, 2009
Messages
9,316
Reaction score
1,064
Age
72
Location
Out side the beltway...
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

Mr. Boo is watching you.
Super Member
Registered
Joined
Feb 14, 2011
Messages
808
Reaction score
58
Location
Burgundy, France
Website
www.upwork.com
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
HTML:
padding: 0em;
instead of
HTML:
padding: 0.1em;
.
 
Joined
Feb 21, 2011
Messages
1,733
Reaction score
197
Location
Amsterdam, the Netherlands
Website
amsterdamassassin.wordpress.com
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