Have img match parent's height with set aspect ratio

Hey so I have a square image, a qr code, that i want to match the height of the parent it's in. The parent's height is intrinsic to the buttons placed as the first child Tried a bunch of stuff but i can't seem to let this image follow Now i did get it working with background-image, but i wonder if this is also possible with html img tag Codepen: https://codepen.io/stefanh-at/pen/RNbEYNB
2 Replies
Mannix
Mannix4w ago
it would be good to know what you tried so far ?
Jochem
Jochem4w ago
height: 100%; seems to work just fine?

Did you find this page helpful?