View Single Post
Old 05-01-2013, 04:28 PM   #22
JSWolf
Resident Curmudgeon
JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.JSWolf ought to be getting tired of karma fortunes by now.
 
JSWolf's Avatar
 
Posts: 80,009
Karma: 147977995
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
Quote:
Originally Posted by DNSB View Post
Not sure if that is a .kepub but on the Kobo using .epubs, the image centering runs into issue with the Adobe code since the common method for centerng images is to set auto margins. Unfortunately, the Adobe code disregards those auto margins. There are workarounds but they are a pain. The Pigs, Gourds and Wikis site had a nice discussion of this problem and some workarounds using the inline-block property.

Regards,
David
Here is the code in the XML for displaying the image centered followed by the relevant CSS code...

Code:
<p class="image"><img alt="" src="2.jpg"/></p>
Code:
p {
    margin-top: 0;
    margin-bottom: 0;
    text-indent: 1.2em
}
.image {
    display: block;
    text-align: center;
    text-indent: 0
}
There nothing auto. There's no inline anything. There no workarounds. It just works.
JSWolf is offline   Reply With Quote