I am trying to create a design with two divs, each with a different background color, and an image placed on top of the divs but positioned on the left side. The challenge is to ensure that the image takes up 50% of the size on any device so it perfectly matches the background colors of both divs.
Below is the code snippet I am currently working with:
.upper {
background-color: #fff8f0;
width: 100%;
height: 288px;
position: relative;
}
.lower {
background-color: #ffe9cd;
width: 100%;
height: 412px;
position: relative;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.4.1/css/bootstrap.min.css" rel="stylesheet"/>
<section class="Bs">
<div class="row">
<div class="col-lg-6">
<div class="upper">
</div>
<div class="lower">
</div>
</div>
<div class="col-lg-6">
<img src="picture/biblestudy.jpg" alt="Bible study people">
</div>
</div>
</section>
Check out the image and background color here.
Thank you for your help!