View Single Post
Old 10-27-2013, 10:37 AM   #6
Arpeggio
Junior Member
Arpeggio began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Oct 2013
Device: All
Quote:
Originally Posted by Jellby View Post
Do you know that CSS classes can be combined? Don't touch the existing ones and just add these:

.wideimg { width: 100%; }
.highimg { height: 100%; }

Now, for wide and short images, change this:

<img class="calibre13 wideimg" src="..." ... />

(simply add "wideimg" to the class attribute, inside the quotes and separated by a space and nothing else). And similarly with tall and narrow images, adding highimg instead.


Not really... The behaviour of "height:100%" is mostly practically undefined in the CSS model, and there's no robust way of referring to the available screen height.
Thanks, I tried that on a tall image and although it fit the images height into ADE it didn't proportionally scale down the width, which made it stretch wide, is there something else I need to ad?

If assigning height 100% is not recommended as it will fail in another reader, then can I ask if most eReader devices rescale images automatically while it is only readers on PC like ADE and Nook that don't? If so perhaps I could be better off leaving it and making sure all images don't exceed an appropriate pixel height for the average monitor size / resolution.
Arpeggio is offline   Reply With Quote