.bg {
background-color: gray;
height: 200px;
}
<div class="bg">
<div>
<img src="https://s3.amazonaws.com/images.seroundtable.com/google-rainbow-texture-1491566442.jpg" style="width:200px">
</div>
<div>
<img src="https://www.w3schools.com/w3css/img_lights.jpg" style="width:200px">
</div>
</div>
Is there a way to add a background to only half of two separate div elements? For example, the bottom half of the first div and the upper half of the second one, without changing the height of the entire div?
https://i.sstatic.net/gJfkC.jpg
Similar to the brown background shown in the image. How can a shared background be applied in the middle of two distinct div sections?