Although @jack provided a solid answer, I have an alternative solution that avoids using an <img>
tag by utilizing the :after
pseudo-element.
This method allows for applying a CSS background image to the container and creating a simulated element with the color overlay:
.container {
background: url(https://loremflickr.com/320/240);
width: 320px;
height: 240px;
position: relative;
}
.overlay > * {
z-index: 1;
position: relative;
color: #fff;
}
.overlay:after {
content: "";
background: #0095ee;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
opacity: .65;
}
<div class="overlay container">
<h1>Title</h1>
</div>
Update:
Your situation may require a different approach. You can adjust the image opacity and introduce a black background to its parent container. Consider implementing the following:
.edgt-justified-layout .edgt-ni-inner .edgt-ni-image-holder .edgt-post-image img {
opacity: .75;
}
.edgt-justified-layout .edgt-ni-inner .edgt-ni-image-holder .edgt-post-image {
background: #000;
}
This adjustment will reduce the image opacity (resulting in a "whiter" appearance), allowing you to add a black background (or any desired color) to the parent container to create a darker effect instead.