I am struggling to align 3 blocks in height and keep the yellow block fixed at the bottom of its parent container.
After trying different solutions, this is the outcome I have:
https://i.sstatic.net/QOHsV.png
The yellow block is not positioned correctly due to the height of the grey block.
I suspect that the "h-100" Bootstrap class is causing this issue, but I have been unable to find an alternative solution.
Do you have any suggestions or solutions to this problem?
Thank you for your help.
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="15777a7a61666167746555213b233b24">[email protected]</a>/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
<div class="row">
<div class="col-12 col-md-4 mb-1 mb-md-2">
<a class="my-card d-block h-100" href="#">
<div class="alert-container additional-message mb-0">
<p class="alert"><span class="alert-title">txt</span></p>
</div>
<div class="p-1 px-lg-2 h-100 d-flex flex-column justify-content-between">
<!-- RED BLOCK -->
<div class="bg-danger">
<p class="mb-0 lead font-weight-bold">title</p>
<p class="mb-0 -mt-1 mt-md-0 ">3h</p>
</div>
<!-- YELLOW BLOCK -->
<div class="bg-warning">
<p class="mt-lg-1 mb-0 text-gray3"> txt <span class="d-none d-md-inline"> - </span><br class="d-block d-md-none"> tx t </p>
<span class="btn btn-secondary mt-1 mt-lg-2">button</span>
</div>
</div>
</a>
</div>
<div class="col-12 col-md-4 mb-1 mb-md-2">
<a class="my-card d-block h-100" href="#">
<div class="alert-container additional-message mb-0">
<p class="alert"><span class="alert-title">txt</span></p>
</div>
<div class="p-1 px-lg-2 h-100 d-flex flex-column justify-content-between">
<!-- RED BLOCK -->
<div class="bg-danger">
<p class="mb-0 lead font-weight-bold">Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has
survived not only five centuries, but also</p>
<p class="mb-0 -mt-1 mt-md-0 ">3h</p>
</div>
<!-- YELLOW BLOCK -->
<div class="bg-warning">
<p class="mt-lg-1 mb-0 text-gray3"> txt <span class="d-none d-md-inline"> - </span><br class="d-block d-md-none"> tx t </p>
<span class="btn btn-secondary mt-1 mt-lg-2">button</span>
</div>
</div>
</a>
</div>
<div class="col-12 col-md-4 mb-1 mb-md-2">
<a class="my-card d-block h-100" href="#">
<div class="alert-container additional-message mb-0">
<p class="alert"><span class="alert-title">txt</span></p>
</div>
<div class="p-1 px-lg-2 h-100 d-flex flex-column justify-content-between">
<!-- RED BLOCK -->
<div class="bg-danger">
<p class="mb-0 lead font-weight-bold">title</p>
<p class="mb-0 -mt-1 mt-md-0 ">3h</p>
</div>
<!-- YELLOW BLOCK -->
<div class="bg-warning">
<p class="mt-lg-1 mb-0 text-gray3"> txt <span class="d-none d-md-inline"> - </span><br class="d-block d-md-none"> tx t </p>
<span class="btn btn-secondary mt-1 mt-lg-2">button</span></div>
</div>
</a>
</div>
</div>