To create the desired layout, utilize the margin-top
property within your .col-md-4
class. Adjust the width
of the image
to your preference.
Check out the demonstration below: (view the snippet in full-page mode to observe all six cards functioning)
img {
margin-top: -66px;
width: 75%;
}
.col-md-4 {
margin-top: 5em;
}
.img {
position: absolute;
margin-left: 8em;
z-index: 999999;
}
.row {
padding: 2em;
}
<!-- Link the latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<!-- Include the jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<!-- Add Popper JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.16.0/umd/popper.min.js"></script>
<!-- Incorporate the latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/js/bootstrap.min.js"></script>
<div class="row">
<div class="col-md-4">
<div class="img">
<img src="https://via.placeholder.com/150">
</div>
<div class="card" style="width: 18rem;">
<div class="card-body">
<h5>Graphic Designer</h5>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
</div>
</div>
</div>
<div class="col-md-4">
<div class="img">
<img src="https://via.placeholder.com/150">
</div>
<div class="card" style="width: 18rem;">
<div class="card-body">
<h5>Developer</h5>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
</div>
</div>
</div>
<div class="col-md-4">
<div class="img">
<img src="https://via.placeholder.com/150">
</div>
<div class="card" style="width: 18rem;">
<div class="card-body">
<h5>Front End Developer</h5>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s,
</div>
</div>
</div>
// Further card details...
</div>