Relative Content

Tag Archive for cssflexbox

Keep element 100% height of parent, even when display: flex applied

I have some cards in a container. The mark-up for the cards is convoluted due to reasons I won’t go into, so assume that the HTML can’t be changed. The text content in the cards may vary in length and my objective is to align the avatar image at the bottom of the cards so that the avatars always line-up regardless of the length of content in the cards. I’m trying to achieve this using a flex layout and setting margin-top: auto on the .card__avatar element. However, the issue is that because these cards contain various nested wrapper divs I’m struggling to get the contents to occupy the full vertical space of the card.

CSS/Flexbox multi row issue

How do I code this in css/flexbox?
Looking how to format this.
I want this figma image to display like this.