Here's the code I use in the Calibre editor. The ePub files I edit and/or create look fine using Adobe Digital Editions.
The following is in the html file where you want the image to be placed:
<p class="image1">
<img src="img.jpg" class="image2"/>
</p>
The following are the CSS codes in the stylesheet.css file:
.image1 {
display: block;
text-align: center;
margin: 0 0;
}
.image2 {
height: 100%;
width: 100%;
}
.image3 {
height: auto;
width: auto;
}
Image2 is for full-page images.
Image3 is for smaller images.
I don't use Word to edit ebooks, since I learned how to use CSS and the Calibre editor, which I find to be much easier and quicker than trying to use Word or any other text editor to create an ePub file.
|