Why is the .col-6
class malfunctioning on screen sizes below 575px, causing the cards to appear distorted? How can this issue be resolved?
To see the problem, click on Run code snippet->Full Page and resize the screen width to below 575px:
.divCard{
float:left;
}
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" integrity="sha384-WskhaSGFgHYWDcbwN70/dfYBj47jz9qbsMId/iRN3ewGhXQFZCSftd1LZCfmhktB" crossorigin="anonymous">
<div class="container-fluid">
<div class="row mx-md-2">
<div class="card-group col-lg-8">
<div class="col-6 col-sm-6 col-md-4 col-lg-4 mb-3 divCard">
<article class="card">
<a href="#">
<img class="card-img-top" src="https://imgjapan.com/wp-content/themes/img_jpn/static/img/global-locations/img-singapore.jpg">
</a>
</article>
</div>
<div class="col-6 col-sm-6 col-md-4 col-lg-4 mb-3 divCard">
<article class="card">
<a href="#">
<img class="card-img-top" src="https://imgjapan.com/wp-content/themes/img_jpn/static/img/global-locations/img-singapore.jpg"></a>
</article>
</div>
<div class="col-6 col-sm-6 col-md-4 col-lg-4 mb-3 divCard">
<article class="card">
<a href="#">
<img class="card-img-top" src="https://imgjapan.com/wp-content/themes/img_jpn/static/img/global-locations/img-singapore.jpg">
</a>
</article>
</div>
</div>
<div class="col-12 col-lg-4" style="background-color: red"></div>
</div>
</div>