Currently, I am attempting to construct a card layout using Bootstrap 4 with flexbox enabled. The image below depicts my current implementation, which is functioning as expected.
https://i.sstatic.net/huXvo.jpg
Here is the HTML structure:
<section>
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="card">
<div class="card-block">
<h4 class="card-title">Curabitur gravida vestibulum imperdiet.</h4>
<p class="card-text">Cras convallis ut turpis vitae facilisis. Morbi eu augue vel quam efficitur rhoncus vitae eget lectus. Cras augue ligula, aliquam ut enim ut, feugiat imperdiet sem. Integer sed mi quis nisl eleifend interdum.</p>
<p class="card-text">Cras convallis ut turpis vitae facilisis. Morbi eu augue vel quam efficitur rhoncus vitae eget lectus. Cras augue ligula, aliquam ut enim ut, feugiat imperdiet sem.</p>
<a href="#" class="btn btn-primary">Read More</a>
</div>
</div>
</div>
<div class="col-md-6">
<img class="card-img-bottom" src="img1.jpg" alt="" title="">
</div>
</div>
</div>
</section>
However, when I view this layout on a larger screen, the output displayed is not what I desire:
https://i.sstatic.net/GGfLx.jpg
What I envision instead is:
https://i.sstatic.net/75aE7.jpg
My question now is how can I properly implement this specific layout? My aim is to have both columns cover 100% of the parent height without any padding between them, while maintaining the aspect ratio of the image as shown in the example (cropped from the center).
I have explored various solutions but they all appear complex or hacky. Could it be that there is no straightforward way to achieve this layout?
Note: The solution does not necessarily need to be Bootstrap-specific; a general solution for this type of problem would be preferable.