Is there a way for me to pass the background images dynamically through inline styles? I can achieve this easily with pseudo elements, but I would like the content of the right and left columns to be enclosed in a container. You can view my proposed solution below.
.colBackgrounds {
position: relative;
color: #fff;
}
.colBackgrounds .container {
border-left: 1px dashed white;
border-right: 1px dashed white;
}
.colBackgrounds:before, .colBackgrounds:after {
z-index: -1;
position: absolute;
content: '';
top: 0;
width: 50%;
height: 100%;
}
.colBackgrounds:before {
left: 0;
background: red;
}
.colBackgrounds:after {
left: 50%;
background: blue;
}
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container-fluid colBackgrounds">
<div class="row">
<div class="container text-center">
<div class="row">
<div class="col-6">
This is the content for the left column
</div>
<div class="col-6">
This is the content for the right column
</div>
</div>
</div>
</div>
</div>
Is it possible to have separate background images for the red and blue columns?
Your assistance would be greatly appreciated, and I hope someone will offer an elegant solution.