why is height: 100%; not working?

Hey, I have a flex container with an image and text. I'd like the image (it's in a div so the div) to take up the full height of the parent container however it doesn't seem to work? it only works with min-height. I don't understand why this is happening? It has the room to grow since the parent container is the height of the text. Unless in this case 100% means the content? Thanks in advance. https://codepen.io/deerCabin/pen/wvLZdEe
R
CodePen
flex-query
...
3 Replies
Lamer of Sweden
Lamer of Sweden3mo ago
Try align-items: stretch; on the parent (.flex) and remove the height from the child (.image-container)
snxxwyy
snxxwyyOP3mo ago
yeah that did it, i had that at one point and it didn't work but now it did haha, thank you.
Lamer of Sweden
Lamer of Sweden3mo ago
Or you should be safe with just removing the height from .image-container and let the img tag set the rule. Not sure when the child is a flex-item what really happens for the height :/
Want results from more Discord servers?
Add your server