Is it possible to not overflow image in div with flex-grow?
As you can see from the codepen https://codepen.io/Lko3001/pen/bGxLRMX?editors=0100, I created a simple card with no specified height but with a max with and an aspect ratio, I inserted an image (with weird proportions i know) and I want it to take all the available space, but still keeping the card's aspect ratio the same, how can I do that?
in the codepen, if you remove the image in the html, you can see the parent div and the image should not be bigger than that. I tried using
overflow: hidden
but didnt work, any suggestion?1 Reply
Fixed it with