![]() |
#1 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 485
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Variable/fixed image height
In the Kindle OS, images with a fixed height (and no specified width) that would exceed the screen width are resized proportionally to fit the screen width. In other words the fixed height is functionally overwritten to fit the image proportionally to the screen if honoring it (proportionally) would result in the image's exceeding the screen width. Otherwise, the fixed height value is honored as long as the implied image width is less than the width of the screen.
How would someone code this kind of conditional behavior in css for epub2 to acheive similar outcomes on non-Kindle, epub-based readers? Last edited by ElMiko; Yesterday at 08:22 AM. |
![]() |
![]() |
![]() |
#2 |
A Hairy Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 3,377
Karma: 20212733
Join Date: Dec 2012
Location: Charleston, SC today
Device: iPhone 15/11/X/6/iPad 1,2,Air & Air Pro/Surface Pro/Kindle PW & Fire
|
Try an svg wrapper.
|
![]() |
![]() |
![]() |
#3 |
Evangelist
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 485
Karma: 65460
Join Date: Jun 2011
Device: Kindle
|
Okay, so lets say i want the attached image to have a height of 4em (unless this would results in a concomitant width that exceeded the device's screen width)...
how would this work with an svg wrapper, bearing in mind this is not a standalone image, but one that occurs with normal text above and below it? |
![]() |
![]() |
![]() |
#4 |
frumious Bandersnatch
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 7,565
Karma: 20150435
Join Date: Jan 2008
Location: Spaniard in Sweden
Device: Cybook Orizon, Kobo Aura
|
What's wrong with "max-height: 4em; max-width: 100%"? Is the natural height of the image less than 4em?
|
![]() |
![]() |
![]() |
Tags |
image height, image scaling |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
line-height is fixed? | nano5 | Viewer | 5 | 01-25-2025 08:01 AM |
Image height | JSWolf | KOReader | 6 | 03-29-2021 04:29 PM |
QT5 and image height | Turtle91 | Sigil | 23 | 02-21-2013 01:44 PM |
Image height in div | soparch | ePub | 5 | 03-29-2012 01:18 PM |
What image height causes images to fill the screen? | karenbryant | ePub | 7 | 01-04-2012 04:23 AM |