Our goal is to create a layout where an image overflows from its container, leaving space for text to fill in the gap created by the offset image on the left side.
https://i.sstatic.net/2dvLa.jpg
Currently, our structure looks like this:
<div class="container">
<div class="row">
<div class="col">
Some paragraph
</div>
<div class="row">
<div class="col-5 body-img-col">
<div class="body-img-wrap">
<img src="images/some-image.jpg" alt="" />
</div>
</div>
<div class="col-7">
Some paragraph
</div>
</div>
<div class="col">
Some paragraph
</div>
</div>
</div>
The body-img-wrap img
is currently set to margin-left: -100px;
. However, there is a gap due to the image overflow, and the text does not fill in the space since it is not in the same column. Our goal is to have the text fill in the gap created by the image overflow.
How can we achieve this specific layout?