I am working on a task, I have to use bootstrap columns and to set images without using custom height and width. it should be set (height: 100%, width: 100% )only, I don't want to use flex it should be column-based. I am stuck on images height. please someone who can point me in the right direction. Thanks In Advance.
Expected Output:
Achieve code: codepen link
.image-box-wrap {
position: relative;
width: 100%;
max-width: 1100px;
margin: 0 auto;
padding: 80px 0;
}
.image-box { position: relative; }
.empty-space { margin-top: 20px; }
.img-box {
width: 100%;
object-fit: cover;
display: block;
}
.image-box { position: relative; }
.left-image {height: fit-content}
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<div class="image-box-wrap">
<div class="image-box">
<div class="row">
<div class="col-lg-4 col-md-4 col-sm-4">
<div class ="box-img">
<img src="https://i.ibb.co/8MGNWpM/photo-1586500036065-bdaeac7a4feb.jpg" class="img-box left-image"/>
</div>
</div>
<div class="col-lg-8 col-md-8 col-sm-8">
<div class="row">
<div class="col-lg-6 col-md-6 col-sm-6">
<div class ="box-img">
<img src="https://i.ibb.co/dLv97wf/bangle-2156210-1920.jpg" class="img-box"/>
</div>
</div>
<div class="col-lg-6 col-md-6 col-sm-6">
<div class ="box-img">
<img src="https://i.ibb.co/dLv97wf/bangle-2156210-1920.jpg" class="img-box"/>
</div>
</div>
</div>
<div class="row empty-space">
<div class="col-lg-12 col-md-12 col-sm-12">
<div class ="box-img">
<img src="https://i.ibb.co/Y0ZRx7B/photo-1498753427761-548428edfa67.jpg" class="img-box"/>
</div>
</div>
</div>
</div><!-- main row Ends Here-->
</div><!-- image-box Ends Here-->
</div><!-- image-box-wrap Ends Here-->