View Single Post
Old 03-05-2013, 11:03 AM   #15
Jellby
frumious Bandersnatch
Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.Jellby ought to be getting tired of karma fortunes by now.
 
Jellby's Avatar
 
Posts: 7,515
Karma: 18512745
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
Quote:
Originally Posted by Turtle91 View Post
The problem this lack of % handling in the <img> brings up is that you can't make an image display LARGER than it's actual dimensions
But, if I understand it correctly, you can still have:

<div><img src="..." alt="" style="width:100%" /></div>

What you can't use is directly <img width="100%"/> (note: no "style"), because the width property accepts only pixel values. But nothing prevents you (as far as I can tell), from using percentages in CSS, and that's what "style" (or stylesheets) are for.

Quote:
What cases have you seen that height:100% would cause the image to appear smaller than intended?? Is that something I should worry about?
If I remember correctly, Prince refers height percentages to the width, so if you have a 9cm×12cm portrait page, and set a 3:4 image as "max-height: 100%; max-width: 100%", it won't end up as 9cm×12cm, but as 6.75cm×9cm.
Jellby is offline   Reply With Quote