.left-text {
margin-right : 25%;
margin-left : 5%;
}
.img-left {
z-index : 10 ;
}
.color-overlap-right {
background-color : #d93;
margin-right : -25%;
}
<div class="row">
<div class="col-sm-6" style="background-color:lavenderblush;">
<div class="color-overlap-right">
<div class="left-text">
<h1 id="heading">Top 8 reasons</h1>
</div>
</div>
</div>
<div class="col-sm-6 img-left" style="background-color:lavender;">
<img class="img-responsive" src="img/1.PNG" alt="1">
</div>
</div>
I am trying to make below HTML layout
Here is how my layout looks like. Entire content on the page is left aligned as shown in image. However there are image and color boxes going outside the width of container. I am facing issue in aligning the content inside the div spanning across entire width to indent along with the text in above column. Can someone please provide me hints?
Edit 1
This answer has been marked duplicate. However just want to add that height of column 1 is more than column 2. Also image in column 2 overlaps the color in column 1. In the solution you have provided, background color is applied to entire parent row which is overwritten in 2nd column by different color which is not case in my scenario.
Edit 2