Jojoba
Jojoba
KPCKevin Powell - Community
Created by Jojoba on 9/16/2024 in #front-end
Responsive layout - grid with image
I guess the description was somewhat confusing The issue is not that not the whole image is shown - the issue is that the image element is too large and "spils down" causing a scroll I try calculating the max-height properly according to the parent element client-height but it doesn't seem to work as well. I will try to explain better what I try achieving and it might help - I try to add a table next to an image. The table should have min width. The image should be as large as it can while keeping the original aspect ratio and not causing any scroll. The solution I came up with works fine when using smaller monitors but once the width is too large, the image takes the whole remaining space, and since it has static aspect ration it height gets more than the parent allows causing a scroll.
3 replies