I have two divs (with different background color) and an image. I want to make the two divs would be the background of the section and put an image on top of these two divs but on the left hand side. I want to make the image to take 50% of the size on any device. So that both image and background color of both divs perfectly matches.
Here is the code I am dealing 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>
This is the image and background color
THANK YOU!!!
3
Answers
Check out the implementation at JS Fiddle
Hope it helps.
The code you have provided showing image is on the
top right
.The code provided below contain image with
width 50%
always on different resolution andtop left