
: Centering images and text in ePUB and Kindle ebooks I am currently creating an ePUB3 file for converting it to Kindle format, and for it be compatible to other ereading devices that support
I am currently creating an ePUB3 file for converting it to Kindle format, and for it be compatible to other ereading devices that support epub.
For centering images and groups of text, I am using this block of css in ePUB
margin: 15px auto;
padding: 0;
text-align: center;
I read while researching that putting the left and right margins as auto and using text-align: center property has the effect of centering block-level elements but that it doesn't work on ADE and other readers based on it due to their inability to properly interpret the auto property. However, in my case, its working, both in ePUB and Kindle devices. Is this something I should be concerned about? Is the way I've done an alright way to do it?
Free books android app tbrJar TBR JAR Read Free books online gutenberg
More posts by @Sarah

: Help creating a toc.ncx file for compatibility with epub 2 I have created a toc.ncx file in EPUB3 for backwards compatibility with EPUB2 . I used that file in a DRM-free book (replacing the

: Can I include code in .mobi to control the native voice synthesizer in a Kindle? Some kindle models come with a text to speech software that has several optional settings. There is both male
1 Comments
Sorted by latest first Latest Oldest Best
You will probably run into problems doing it that way, particularly on iBooks. The most reliable method I've found for centering is:
<div class="centered_image">
<img src="image.jpg" alt="Alternate text" />
</div>
With css like this:
div.centered_image {
width: 60%;
margin: 1em 20%;
}
div.centered_image img {
width: 100%;
}
On a very few reading systems (notably the nook), this can cause problems on some images due (I'm guessing) to rounding errors, so you may have to set the margins just a hair smaller (like 19% in the above example).
Free books android app tbrJar TBR JAR Read Free books online gutenberg