I have three different cards, each with varying content. I want to ensure that all elements within these cards maintain the same height, even though the content differs. The goal is to achieve a uniform look across all cards, as shown in the image below:
I thought i can be done with css grid but can not get idea how to apply.Could someone please guide me on how to achieve equal heights for all corresponding elements in these cards? Any help or suggestions would be greatly appreciated!
Thank you in advance.
3
Answers
The easy way is to use flex.
See this sample:
Try playing around with
min-height: 100%
on the respective divs. See the example below.I have added the background color to make the margins stand out.
Use
display: flex
for parent element, and setheight: auto
for the children: