I'm having trouble aligning the bottom rows of my Bootstrap cards. I tried using position: absolute;
, but the text overlaps on smaller screens. In this scenario, the icons in the first and third card rows should line up when displayed side by side, but instead they are positioned directly below the content of the cards.
https://i.sstatic.net/SaYTC.png
<div class="container-flex m-2">
<ul class="row list-group list-group-horizontal align-items-stretch flex-wrap">
<li class="list-group-item border-0">
<div class="card h-100 justify-content-between">
<div class="card-body">
<div class="card-text h-100">
<p>To start, keep your face forward while tilting your head sideways to bring your ears and shoulders closer together.</p>
<p class="text-secondary"mazu, kao wa shoumen o muita mama, mimi to kata o chikadukeru youni atama wo yoko ni taoshimasu.</p>
<p>First, turn your head sideways, with your face facing straight ahead, bringing your ears and shoulders closer together.</p>
<div/>
<div class="row">
<div class="col"><i class='fab fa-youtube pr-3' style='font-size:24px'></i><i class='fas fa-volume-up' style='font-size:24px'></i></div>
<div class="col text-right"><i class='far fa-trash-alt' style='font-size:24px'></i></div>
</div>
</div>
</div>
</li>
<li class="list-group-item border-0">
<div class="card h-100">
<div class="card-body">
<div class="card-text">
<p>To start, keep your face forward while tilting your head sideways to bring your ears and shoulders closer together. Repeat it again for emphasis.</p>
<p class="text-secondary"mazu, kao wa shoumen o muita mama, mimi to kata o chikadukeru youni atama wo yoko ni taoshimasu.</p>
<p>First, turn your head sideways, with your face facing straight ahead, bringing your ears and shoulders closer together. Repeat it again for emphasis.</p>
<div/>
<div class="row">
<div class="col"><i class='fab fa-youtube pr-3' style='font-size:24px'></i><i class='fas fa-volume-up' style='font-size:24px'></i></div>
<div class="col text-right"><i class='far fa-trash-alt' style='font-size:24px'></i></div>
</div>
</div>
</div>
</li>
<li class="list-group-item border-0">
<div class="card h-100">
<div class="card-body">
<div class="card-text">
<p>To start, keep your face forward while tilting your head sideways to bring your ears and shoulders closer together.</p>
<p class="text-secondary"mazu, kao wa shoumen o muita mama, mimi to kata o chikadukeru youni atama wo yoko ni taoshimasu.</p>
<p>First, turn your head sideways, with your face facing straight ahead, bringing your ears and shoulders closer together.</p>
<div/>
<div class="row">
<div class="col"><i class='fab fa-youtube pr-3' style='font-size:24px'></i><i class='fas fa-volume-up' style='font-size:24px'></i></div>
<div class="col text-right"><i class='far fa-trash-alt' style='font-size:24px'></i></div>
</div>
</div>
</div>
</li>
</ul>
</div>
</div>
CSS
.list-group-item {
width: 95%;
margin: 1% !important;
padding: 0; !important;
}
@media (min-width: 576px) {
.list-group-item {
}
}
@media (min-width: 768px) {
.list-group-item {
width: 47%;
margin: 5px 1% !important;
}
}
@media (min-width: 992px) {
.list-group-item {
width: 31.333%;
margin: 5px 1% !important;
}
}
Thank you!