Is there a way to use a blue bar behind the image like this?
This is what I’m doing:
.line-divider{
height: 125px;
background-color: #29334B;
}
<div>
<div style="background-color: green; width: auto; height: auto;">
<div class="line-divider" style="background-color: red;">
<img
src="https://dfstudio-d420.kxcdn.com/wordpress/wp-content/uploads/2019/06/digital_camera_photo-1080x675.jpg"
contain
height="300px"
>
</div>
</div>
</div>
2
Answers
Here’s how I would tackle this, apologise but I had to change the HTML and CSS.
Here’s a simple way to do it with Grid layout: