Interesting....
So, to be clear, I don't have a problem with the scrollbar per se. I mean, if it is necessary to see the whole image then I definitely want it! What I think I'm seeing now is that even at 100%, the vertical scroll bar is actually just showing a sliver of white space below the image, not actually revealing any more of the image (and i assume this is what you mean by "that means nothing"). So what's really happening (I think...???) is that the picture IS 100% of the window height... its just that the container is greater than 100% of the window height, hence the extra little sliver of whitespace that results in the scrollbar (unless you hide "overflow").
Regarding how the two programs render it, I'm seeing that Calibre proportionally resizes the image when you narrow or widen the window, but Sigil stretches the image if you widen the window (which you alluded to in your first post).
If you set the image width to "auto", again, Calibre proportionally resizes the image when you widen or narrow the window. Basically, it doesn't allow for overflow—hidden or not. In Sigil/Preview, widening the window preserves the aspect ratio just fine, BUT narrowing the window results in the left side of the image being cut off (presumably because the overflow has been hidden).
Now.... here's where things go completely off the rails. If I use the attached "Test1" file which seems to be the same as yours except that I've switched out your image for my image, setting width to "auto" results in a squishy image in Calibre!
If i change your image to "auto", it resizes perfectly in Calibre (but cuts off the image in Sigil); if i use the same code on MY image, it gets squished in Calibre.
I've attached both your file (modified to "auto") and mine...
P.S. one important thing I learned is that <p> has embedded margins, while <div> does not, so I've changed that container for the image itself, as per your example.
P.P.S. Does anyone here know how we can just instantly upload knowledge to our brains as in The Matrix? That would save me a lot of time. kthxbye.
Last edited by ElMiko; 06-14-2025 at 07:23 PM.
|