I have 3 columns these columns have same section e.g title, address and etc. not only i want the card to have the same height but also the nested section should have the same height e.g if in one section title having 3 line, in second and third section title should maintain the same height even if it is short. I have tried doing this but failed so far.
<div class="container">
<div class="card">
<div class="row" style="background-color: yellowgreen;">Hey this is tariq</div>
<div class="row">Hey this is tariq
Hey this is tariq
Hey this is tariq
Hey this is tariq
</div>
<div class="row">Hey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsa
</div>
<div class="row">Hey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd Hey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsaHey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsaHey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsaHey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsa
asdfaasd
asdfsa
</div>
</div>
<div class="card"> <div class="row" style="background-color: yellowgreen;">Hey this is tariq</div>
<div class="row">Hey this is tariq
Hey this is tariq
Hey this is tariq
Hey this is tariq
</div>
<div class="row">Hey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsa
</div>
<div class="row">Hey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd Hey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsaHey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsaHey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsaHey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsa
asdfaasd
asdfsa
</div></div>
<div class="card">
<div class="row" style="background-color: yellowgreen;">Hey this is tariq
Hey this is tariq
Hey this is tariq
Hey this is tariq
</div><div class="row">Hey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd Hey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsaHey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsaHey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsaHey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsa
asdfaasd
asdfsa
</div>
<div class="row">Hey this is tariq asdfa sdfasd asdnasdfnasdfas
asdf asdnasdfnasdfas fasd
fa
sdfa sdfasd
asdfaasd
asdfsa
</div><div class="row">Hey this is tariq</div>
</div>
</div>
<style>
.container {
display: flex;
gap: 14px;
justify-content: center;
}
.card {
width: 22%;
height: 600px;
background: radial-gradient(black, transparent);
align-self: stretch;
}
.row{
border-bottom: 1px solid;
}
</style>
Same height of green section in all 3 column
3
Answers
.row {
border-bottom: 1px solid;min-height:200px
}
Try this
Solution with JavaScript
This script gets all the height values of rows and stores highest value in array for every row type. And then sets all rows to that highest hight value.
check out this codepen that shows solution:
https://codepen.io/Nadir_Alishly/pen/GRYKREp