@yudiyoshida
Posted
You can also apply an overlay this way:
HTML:
<div class="container-with-background-img">
<div class="overlay"></div>
...
</div>
CSS:
.container-with-background-img {
background-image: url("...");
position: relative;
}
.overlay {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: black;
opacity: 0.6;
}
@yudiyoshida
Posted
And if you want to add more content inside parent div, you need to make them relative as well.
@yudiyoshida Thank you for your tip!