Divi background color overlay hack

08/03/2021

UPDATE: You can use background gradient to get an overlay in the right color.

I recently learned there’s a much easier way than the one I described below to get an overlay in the right color: use the background gradient option instead of a solid background color.

When you use a background gradient in combination with an image, you’ll get a switch
“place gradient above background image”. When you flip that switch to “yes”, the gradient will overlay the image.

Here are the steps:

1) Click on the third icon (image) under the background options to select your background image. Next, click on the second icon (gradient).

2) Select the gradient colors you want to use. If you want to use a solid color, just select the same color twice. 

3) Set the switch under “Place Gradient Above Background Image” to “yes”.

4) Use the opacity bar to set the desired transparency, so the image becomes visible.

You can set the same opacity for both colors, but you could also play with that a bit to get a cool effect. For example, you can get a beautiful subtle effect by choosing two colors that a really close together, for example a lighter and darker shade of the same color. 

Divi background gradient

For a website I was building, I wanted a color overlay on a background image with 0.9 alpha value (so it would have an opacity of 90%). Divi has a built-in overlay blend mode, but that didn’t give the result I wanted. Even with the color of a alpha value of 1 (which is a solid color without any opacity), the image would still be visible way too clear, and moreover in a totally different color than I selected. So I found another way…

divi overlay hack

The way I did it was by creating a copy of my section, and delete all the content from that copy. The only thing that IS still in that copied section, is a background image.

The original section still contains all the content, and a background color with the desired opacity op 90%.

Next, you’ll have to place both sections over each other. I did that by giving the copy an absolute position (in section settings –> advanced tab –> position). That way, it won’t take up any space.

In my case, the section was the header so I didn’t have to use a top or bottom value, because the absolute position sticks the section on the top of the page.

If you need to use this anywhere else on the site, you might have to play with that a bit, or use (negative) margins to get the copy section in the right place.

You will also have to make sure both sections have the same height of course (which you can do by giving the section a fixed height in the design –> sizing tab) and if you’re using a shape divider, both headers should have that too.

Alternatively, you could also put the background image on the section, and use just one full width row without any margin and give that the background color. Goodluck!

placeholder

Need help with your Divi website?

Hire me to build a website for you, to provide training on this topic of help you in another way via my prepaid credit bundles.

Have a question about this article? Ask it in the comments below!

Some links on this site are affiliate links. If you buy a plugin or theme via such link, I may get a commission for referring you.
That doesn’t cost you anything extra, but it does stimulate me to keep publishing valuable content like this for free.

5 responses to “Divi background color overlay hack”

  1. Tumikia Avatar
    Tumikia

    Thank you, Bob. After watching videos, this is the only solution that worked.

  2. Bob the webbuilder Avatar
    Bob the webbuilder

    Glad to hear that Tumikia 🙂

  3. David Avatar
    David

    This doesn’t seem to work anymore. There is no place gradient above image option.

  4. Bob the webbuilder Avatar
    Bob the webbuilder

    Hi David,

    Just tested it with the latest version of Divi (4.19.5), seems to work fine from here 🙂

    Best regards from Bob

  5. Sally Avatar
    Sally

    You have to make the gradient before you see it David.

Leave a Reply

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