Quantcast
Channel: MobileRead Forums - Kindle Formats
Viewing all articles
Browse latest Browse all 862

Odd margin error on Kindle

$
0
0
Attached is an epub source that shows some strange issues with margins when converted to any modern format that a Kindle can use (KF8 or KFX).

There are two pages in the epub...the first renders correctly on every reader other than a Kindle that I can test. The second page gives close to the results I want on a Kindle (including Kindle Previewer 3), but not on other readers.

The CSS class heading-chapter is used to create a box that is at the right-hand side of the page. Then, heading-chapter-header and heading-chapter-number center that info in the box. Below that, the CSS class heading-chapter-image moves in the left and right margins from heading-chapter and then para-centerFirst is used to center an image that uses image-fitwidth to get the image centered and filling the width, so that the image will be generally narrower than the text (except for very small base font size choices from the reader).

The problem is that the image is not centered on the text when rendered by the Kindle. I need to adjust the margins from being 30% on each side to being 25% and 10% (left and right respectively) in order to get close to centered.

This seems like really simple CSS to me, and I'd like a version that works on all readers.

Any ideas?

Attached Thumbnails
Click image for larger version

Name:	KindleCSSCentering.png
Views:	N/A
Size:	44.0 KB
ID:	202118  
Attached Files
File Type: epub ConvertTest - (testing).epub (5.4 KB)

Viewing all articles
Browse latest Browse all 862

Trending Articles