DEV Community

loading...

Discussion on: Is it possible to have a responsive image in a flexbox item?

Collapse
equinusocio profile image
Mattia Astorino • Edited

On firefox all works as expected. On Chrome it seems to be a render error because if you uncheck/check one of img or .funny properties from the inspector the image issue get fixed.

Btw, since .parent have a fixed height (it force the aspect ratio of the image) you can't make the last image covering the space maintaining his aspect ratio without touching .funny. You can try to use object-fit cover on the last image..but it will crop the image.

You can also set .funny to have a max-with that match your requirements.