View Single Post
Old 12-10-2013, 11:11 AM   #4
RbnJrg
Wizard
RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.RbnJrg ought to be getting tired of karma fortunes by now.
 
Posts: 1,849
Karma: 8700631
Join Date: Mar 2013
Location: Rosario - Santa Fe - Argentina
Device: Kindle 4 NT
Quote:
Originally Posted by Gramlin View Post
Thank you.

Learning as I go. Found a decent tutorial for web html that explained how to limit a scaling image to a particular max. I suspected it might not translate perfectly to ePub.

Would you caution against using images that adjust size? It hardly matters on fixed screen devices but I was anticipating desktop readers. Bit ambitious, perhaps?
Maybe by inserting the image employing only a block with a width in percentage of the screen you can have your image dinamically resized. For example:

1. In your css stylesheet:

Code:
p {
   text-align: justify;
   text-indent: 0;
}

.imgfexample {
   float: left;
   width: 30%; /* here you can set the width that you wish */
   height: auto;
   margin: 0 10px 10px 0;
}

2. And in your .html file:

Code:
<p><img class="imgfexample" alt="" src="../Images/YourImageHere.jpg" />Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla ac tellus nunc. Phasellus imperdiet leo metus, et gravida lacus. Donec metus ligula, elementum at pellentesque pellentesque, suscipit ac nunc. Etiam lobortis, massa ac aliquam auctor, augue nisl sagittis urna, at dapibus tellus erat ullamcorper ligula. Praesent orci dui, pulvinar id convallis a, faucibus non mauris. Donec tellus augue, tempus sed facilisis sed, fringilla quis leo.</p>
Of that way the image always will occupy the X% of the screen. But I'm not sure is that is what you want

Regards
Rubén
RbnJrg is offline   Reply With Quote