View Single Post
Old 02-01-2016, 01:12 PM   #1
AlanHK
Guru
AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.AlanHK ought to be getting tired of karma fortunes by now.
 
AlanHK's Avatar
 
Posts: 681
Karma: 929286
Join Date: Apr 2014
Device: PW-3, iPad, Android phone
scaling images for Kindle on iOS

I have an image used as a section divider between paras of text.
I wanted it to be 1.5 times the height of body text.

The image is a png, 145x150 pixels.

I make an ePub using this code:

<div>
<img alt="*" class="section" src="../Images/sword.png"/>
</div>

and the css defn is
.section {
height: 1.5em;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 2em;
}



This works fine in epub. I convert to mobi using Amazon's Kindle Previewer.
This also works fine on Kindles and Mac Kindle readers.

But in iOS on iPad and iPhone, the image is apparently not scaled and appears full size, or at any rate much larger than 1.5 em.


How then do I make it scale on iOS as well?
AlanHK is offline   Reply With Quote