View Single Post
Old 10-11-2025, 09:59 AM   #30
ElMiko
Fanatic
ElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileReadElMiko has read every ebook posted at MobileRead
 
ElMiko's Avatar
 
Posts: 519
Karma: 65460
Join Date: Jun 2011
Device: Kindle Voyage, Boox Go 7
Quote:
Originally Posted by RbnJrg View Post
In that case, with a image wider than highter, the solutions you can read in the last epub I uploaded will work for you; images won't have any blank spaces and they will maintain their proportions. But under epub3, don't set the height by the "height" property, instead use "max-height: 2em; width: auto" and all of your conditions will be satisfied.
Sorry @RbnJrg, I've been away from my computer for a week, so haven't really had a chance to play around with this until now.

For the epub2, it doesn't honor a specific height (as the value there is set to "auto") making it ALWAYS 100% of the width of the window. (unless of course I change that value to Xem, in which case it runs the risk of the white space above and below if the screen is too narrow for the image)

For the epub3 solution, it's a little funkier still... Changing the max-height value doesn't seem to have any effect at all—4em (as it is set in the original file) and 2em (as you said above) render the image exactly the same: always 100% of the width of the window, at a proportional height. Even more bizarrely, setting it to 1em results in the image's overlapping the paragraph below it.
ElMiko is offline   Reply With Quote