what are the ways that i can follow to mange the height in card created using bootstrap

Hello i have a card containers that have 3 cards on ii don't have any problem in managing its width but i have problems in height as below , the third one is now have height greater than the others ,consider this datacomes from daabase how can i mange the height, i want them all to be on the same heigh, included a screenshot
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-2">
<div class="col-md-12">
<div class="card text-bg-primary">
<div class="card-body">
<h5 class="card-title">
welcome
</h5>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
</div>
</div>
</div>
<div class="col">
<div class="card text-bg-danger">
<div class="card-body">
<h5 class="card-title">
welcome
</h5>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
</div>
</div>
</div>
<div class="col">
<div class="card text-bg-warning">
<div class="card-body">
<h5 class="card-title">
welcome
</h5>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
</div>
</div>
</div>
</div>
<div class="row row-cols-1 row-cols-md-2 row-cols-lg-3 g-2">
<div class="col-md-12">
<div class="card text-bg-primary">
<div class="card-body">
<h5 class="card-title">
welcome
</h5>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
</div>
</div>
</div>
<div class="col">
<div class="card text-bg-danger">
<div class="card-body">
<h5 class="card-title">
welcome
</h5>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
</div>
</div>
</div>
<div class="col">
<div class="card text-bg-warning">
<div class="card-body">
<h5 class="card-title">
welcome
</h5>
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptas, cupiditate doloremque distinctio saepe fugit beatae vitae ratione hic nobis suscipit.
</div>
</div>
</div>
</div>
No description
15 Replies
snxxwyy
snxxwyy•6mo ago
to make them the same height you'd need to add align-items: stretch.
Tok124 (CSS Nerd)
Tok124 (CSS Nerd)•6mo ago
You can remove the col columns
Tok124 (CSS Nerd)
Tok124 (CSS Nerd)•6mo ago
No description
Tok124 (CSS Nerd)
Tok124 (CSS Nerd)•6mo ago
stretch is the default thats not the problem
snxxwyy
snxxwyy•6mo ago
alright, i guess it's a tailwind thing, i thought they set it to start or something
steven preadly
steven preadlyOP•6mo ago
i am using bootstrap
Tok124 (CSS Nerd)
Tok124 (CSS Nerd)•6mo ago
Do what i did, then you can create some gap between the items using the gap property, not sure what the bootstrap class for gap is, i personally never use bootstrap
steven preadly
steven preadlyOP•6mo ago
it is gap-1 ,2,3 etc
Tok124 (CSS Nerd)
Tok124 (CSS Nerd)•6mo ago
Ah okay, yeah go with that then 🙂
steven preadly
steven preadlyOP•6mo ago
In that case there is no need to us the columns I can instead use flexox in that case i am still have the same problem
Mannix
Mannix•6mo ago
instead of wrapping the cards with a col class add that class to the card
steven preadly
steven preadlyOP•6mo ago
if i added the col class with the card class i cant use gutter to make space between the first card and the secoun
Mannix
Mannix•6mo ago
how about h-100 to the card?
steven preadly
steven preadlyOP•6mo ago
i will try
Coding_Tarzan
Coding_Tarzan•5mo ago
Add it to all cards, this should work "When you need equal height, add .h-100 to the cards. If you want equal heights by default, you can set $card-height: 100% in Sass." Source: https://getbootstrap.com/docs/5.3/components/card/#about Scroll down to Grid cards
Cards
Bootstrap’s cards provide a flexible and extensible content container with multiple variants and options.
Want results from more Discord servers?
Add your server