Any tricks for making a div inside any column be able to extend to the right (or left) edge? I need to stick with a fixed container and not a fluid one. Also, because of the CMS, the "extended block" needs to remain in the markup (can't be a CSS pseudo element ).
https://codepen.io/mwmd/pen/eLPxOX
<div class="container">
<div class="row">
<div class="col-sm-7">
<p>How can I get that div to extend to viewport right while maintaining its left edge to the Bootstrap column?</p>
</div>
<div class="col-sm-5">
<div class="extend-me">
<img src="https://via.placeholder.com/350x150"/>
</div>
</div>
</div>
</div>
.container {
background-color: #999;
}
.extend-me {
background-color: darkred;
height: 300px;
}
.extend-me img {
object-fit: cover;
width: 100%;
height: 300px;
}
Not answered by Extend an element beyond the bootstrap container because this solution uses a pseudo element.
Not answered by Extend bootstrap row outside the container because this solution only works on a 50% 50% split.