Base scenario:
<div class="flex">
<div id="avatar" />
<div id="info"/>
</div>
Assuming info
will have a dynamic height, based on its content, how can we make avatar
be always square?
In the first example, info
has 160px height, so avatar
is a 160x160 square.
In the second example, info
has more content and its height is 305px, same applies to the avatar
Is there a css-only solution?
I was playing with Tailwind: https://play.tailwindcss.com/5ooxVe8F7E, but the green div in this link should have the same height as the red one.