View Single Post
Old 07-14-2015, 05:46 PM   #1
Spinaz
Junior Member
Spinaz began at the beginning.
 
Posts: 2
Karma: 10
Join Date: Jul 2015
Device: Kindle Paperwhite
Azw3 - Problems with images

Hi! I'm new to the forum and ebook publishing in general so I have a lot of doubts and I'm still trying to learn, sorry if this turns out to be a really simple thing...

I'm trying to create an ebook for multiple devices, so I have an epub3 to use on pc and ibook and an azw3 for the kindle.

The new problem at the moment is: I created the text in Indesign and placed the image at the center of the page.
However, when I create the epub3 and convert it to azw3, the image in the kindle is not centered and is cut at the right.
I don't have and epub3 compatible device to test the file on.
Here I have a photo on the kindle to show you the problem.
https://www.dropbox.com/s/6ec5uoz8iy...31918.jpg?dl=0

Here is the code taken from the epub3 created with indesign

Code:
textextextext </p>
			<div class="_idGenObjectLayout-1">
				<div id="_idContainer004">
					<center><img class="_idGenObjectAttribute-1" src="image/robinson1.jpg" alt=""/></center>
				</div>
			</div>
			<p class="Text">textextextext
And the relative CSS

Code:
#_idContainer004, #_idContainer005, #_idContainer006, #_idContainer007 {
	display:inline-block;
	height:720px;
	width:720px;
}
img._idGenObjectAttribute-1 {
	height:100%;
	min-width:100%;
	width:100%;
}
div._idGenObjectLayout-1 {
	text-align:center;
}
And this is the azw3 code ( I converted it from the epub3 with calibre )
Code:
textextext</p>
			<div class="_idgenobjectlayout">
				<div class="calibre8" id="_idContainer004">
					<center class="calibre9"><img alt="" class="_idgenobjectattribute" src="../images/00001.jpeg"/></center>
				</div>
			</div>
			<p class="text">textextext
and the relative CSS

Code:
.calibre8 {
    border-bottom-width: 0;
    border-left-width: 0;
    border-right-width: 0;
    border-top-width: 0;
    display: inline-block;
    height: 720px;
    margin-bottom: 0;
    margin-left: 0;
    margin-right: 0;
    margin-top: 0;
    padding-bottom: 0;
    padding-left: 0;
    padding-right: 0;
    padding-top: 0;
    width: 720px
    }

.calibre9 {
    display: block;
    text-align: center
    }

.calibre9 {
    display: block;
    text-align: center
    }
Also, is there a way to center the image vertically between the two paragraphs?

The epub need to be reflowable and not fixed.
I'm using calibre on windows 8.1 and I have a kindle paperwhite.
On on an Ipad with ibooks (epub3 ) the images are centered, both vertically and horizontally.

Sorry for the long post but I searched online for some guides and I can't understand where I'm making a mistake...
Thanks in advance! : )

Last edited by Spinaz; 07-14-2015 at 06:56 PM.
Spinaz is offline   Reply With Quote