DEV Community


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

jhomkarlo profile image

Well, i don't know why div.funny doesn't take the width of it's contents, i prefer avoiding those and thinking differently.

You can take the img and putting as a direct child of div.parent

I hope this work for you.

mckabue profile image
Kabue Charles Author

thanks. i noted that when the image is a direct flex-item, it works, until it is a child of another flex item. the latter is my requirement... i also noted that when i specify the height of the image in pixels, it works, but that is half responsive...