How to add a Black Transparent Overlay on Cover image?

Looking for to add a black transparent layer on top of the current cover image to make a better contrast between headings and cover image, here is how:

The easiest way of doing this is to actually lay a gradient over the top of the image using a css definition like this bellow:

.your-css-selector {
background: linear-gradient(
		rgba(20,20,20, .5), 
		rgba(20,20,20, .5)),
		no-repeat center url(/path/your-image);

You could put any color in the gradient. using the rgba you can set the alpha (last unit inside the parenthesis) to any decimal value between 0 and 1.

IE: if this is too dark change both to .3 if too light change to .8.


CSS Background Before


CSS Background After

hope this helps!

Become a member

Get the latest news right in your inbox. We never spam!

Leave a Reply

Your email address will not be published. Required fields are marked *