[et_pb_section fb_built=”1″ custom_padding_last_edited=”on|desktop” admin_label=”section” _builder_version=”3.22″ custom_padding=”0px|||||” custom_padding_tablet=”50px|0|50px|0″ custom_padding_phone=”” transparent_background=”off” padding_mobile=”off” make_fullwidth=”off” use_custom_width=”off” width_unit=”off” custom_width_px=”1080px” custom_width_percent=”80%”][et_pb_row padding_mobile=”off” column_padding_mobile=”on” _builder_version=”4.4.8″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” width=”100%” max_width=”100%” custom_padding=”0px|||||” make_fullwidth=”off” use_custom_width=”off” width_unit=”on” custom_width_px=”1080px” custom_width_percent=”80%”][et_pb_column type=”4_4″ _builder_version=”3.25″ custom_padding=”|||” custom_padding__hover=”|||”][et_pb_video src=”https://www.youtube.com/watch?v=EfhzmIvwpDQ” image_src=”//i.ytimg.com/vi/EfhzmIvwpDQ/hqdefault.jpg” _builder_version=”3.0.47″][/et_pb_video][/et_pb_column][/et_pb_row][et_pb_row padding_mobile=”off” column_padding_mobile=”on” _builder_version=”3.25″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” width=”100%” max_width=”100%” width_unit=”off”][et_pb_column type=”4_4″ _builder_version=”3.25″ custom_padding=”|||” custom_padding__hover=”|||”][et_pb_text admin_label=”Divi Background Plus” _builder_version=”3.27.4″ text_font=”|on|||” text_font_size=”18″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” module_alignment=”left” border_style=”solid”]We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row padding_mobile=”off” column_padding_mobile=”on” _builder_version=”3.25″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” width=”100%” max_width=”100%” make_fullwidth=”off” use_custom_width=”off” width_unit=”off” custom_width_px=”1080px” custom_width_percent=”80%”][et_pb_column type=”4_4″ _builder_version=”3.25″ custom_padding=”|||” custom_padding__hover=”|||”][et_pb_text _builder_version=”3.27.4″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” module_alignment=”left” use_border_color=”off” border_color=”#ffffff” border_style=”solid”]The Fullwidth Header section in Divi gives you the option to create a background overlay. However, for standard sections (or any other location) that option is not available. This means you have to create the overlay on your photo using Photoshop or something similar. This makes it very difficult to change and test…
This tutorial will show you how to create a background overlay where it is not available in Divi. This overlay makes reading the text easier.
This doesn’t just make it easier to change and adjust using the Inspect Element tool, but also provides ease in adjusting photos and colors.
Check out the video above to learn how to implement the overlay effect in Divi today! We use ANTHEM in the video for demo purposes, but this will work on any Divi site.
[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row column_structure=”1_2,1_2″ padding_mobile=”off” column_padding_mobile=”on” _builder_version=”3.25″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” width=”100%” max_width=”100%”][et_pb_column type=”1_2″ _builder_version=”3.25″ custom_padding=”|||” custom_padding__hover=”|||”][et_pb_text admin_label=”before the overlay” _builder_version=”3.27.4″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” module_alignment=”left” use_border_color=”off” border_color=”#ffffff” border_style=”solid”]
[/et_pb_text][et_pb_image src=”https://superfly-storage.s3.us-east-2.amazonaws.com/wp-content/uploads/2017/01/22135120/before-overlay.png” align=”center” align_tablet=”center” align_phone=”” align_last_edited=”on|desktop” _builder_version=”3.23″ animation_style=”fade” animation_duration=”500ms” use_border_color=”off” border_color=”#ffffff” border_style=”solid” animation=”fade_in” sticky=”off” always_center_on_mobile=”on”][/et_pb_image][/et_pb_column][et_pb_column type=”1_2″ _builder_version=”3.25″ custom_padding=”|||” custom_padding__hover=”|||”][et_pb_text admin_label=”after the overlay” _builder_version=”3.27.4″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” module_alignment=”left” use_border_color=”off” border_color=”#ffffff” border_style=”solid”]
[/et_pb_text][et_pb_image src=”https://superfly-storage.s3.us-east-2.amazonaws.com/wp-content/uploads/2017/01/22135119/after-overlay.png” align=”center” align_tablet=”center” align_phone=”” align_last_edited=”on|desktop” _builder_version=”3.23″ animation_style=”fade” animation_duration=”500ms” use_border_color=”off” border_color=”#ffffff” border_style=”solid” animation=”fade_in” sticky=”off” always_center_on_mobile=”on”][/et_pb_image][/et_pb_column][/et_pb_row][et_pb_row padding_mobile=”off” column_padding_mobile=”on” _builder_version=”3.25″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” width=”100%” max_width=”100%” make_fullwidth=”off” use_custom_width=”off” width_unit=”off” custom_width_px=”1080px” custom_width_percent=”80%”][et_pb_column type=”4_4″ _builder_version=”3.25″ custom_padding=”|||” custom_padding__hover=”|||”][et_pb_text _builder_version=”3.27.4″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” module_alignment=”left” border_style=”solid”]
Go for it… it’s just a few minutes. It will save you time in the end since you’ll know how it all works!
For this tutorial, we put all CSS in the section CSS itself. NOT in the Divi Custom CSS section in General Settings.
Add the snippet of CSS below. Adjust colors as needed.
Add the snippet of CSS below marked “if using parallax” into the “before” section. Then change the section class to “greyOverlay”.
[/et_pb_text][et_pb_toggle title=”gimme that code!” open_toggle_text_color=”#ffffff” closed_toggle_background_color=”#ec008c” admin_label=”Gimme that code!” _builder_version=”3.0.87″ title_text_color=”#ffffff” body_text_color=”#ffffff” background_size=”initial” background_position=”top_left” background_repeat=”repeat” use_border_color=”off” border_color=”#ffffff” border_style=”solid”]
/* PLACE IN THE BEFORE AREA */
content:"";
display: block;
height: 100%;
position: absolute;
top: 0;
left: 0;
width: 100%;
background-color: rgba(58, 60, 69, .6);
/* IF USING PARALLAX */
.greyOverlay .et_parallax_bg:before, .greyOverlay:before {
content:"";
display: block;
height: 100%;
position: absolute;
top: 0;
left: 0;
width: 100%;
background-color: rgba(58, 60, 69, .6);
}
[/et_pb_toggle][et_pb_text _builder_version=”3.27.4″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” module_alignment=”left” use_border_color=”off” border_color=”#ffffff” border_style=”solid”]
Feel free to play around with changing the CSS class to a few of the other options to find out which style works best for you!
Stay Fly,
Superfly Squad
You can use this trick on any Divi site! But if you like the demo we used, it’s called “ANTHEM” and it’s pretty fly if we may say so ourselves…
[/et_pb_text][et_pb_button button_url=”https://besuperfly.com/product/anthem-child-theme/” url_new_window=”on” button_text=”Buy the ANTHEM Theme” button_alignment=”center” _builder_version=”3.16″ custom_button=”on” button_text_size=”15px” button_bg_color=”#000000″ button_border_color=”#000000″ button_border_radius=”0″ button_letter_spacing=”0″ button_use_icon=”off” background_layout=”dark” button_border_color_hover=”#ec008c” button_border_radius_hover=”0″ button_letter_spacing_hover=”0″ button_bg_color_hover=”#ec008c” button_text_size__hover_enabled=”off” button_one_text_size__hover_enabled=”off” button_two_text_size__hover_enabled=”off” button_text_color__hover_enabled=”off” button_one_text_color__hover_enabled=”off” button_two_text_color__hover_enabled=”off” button_border_width__hover_enabled=”off” button_one_border_width__hover_enabled=”off” button_two_border_width__hover_enabled=”off” button_border_color__hover_enabled=”on” button_border_color__hover=”#ec008c” button_one_border_color__hover_enabled=”off” button_two_border_color__hover_enabled=”off” button_border_radius__hover_enabled=”on” button_border_radius__hover=”0″ button_one_border_radius__hover_enabled=”off” button_two_border_radius__hover_enabled=”off” button_letter_spacing__hover_enabled=”on” button_letter_spacing__hover=”0″ button_one_letter_spacing__hover_enabled=”off” button_two_letter_spacing__hover_enabled=”off” button_bg_color__hover_enabled=”on” button_bg_color__hover=”#ec008c” button_one_bg_color__hover_enabled=”off” button_two_bg_color__hover_enabled=”off”][/et_pb_button][/et_pb_column][/et_pb_row][/et_pb_section]
Pete
January 13, 2017Excellent! I had this very issue only last week, did what you did at first however that wasn’t great.
The way you show above is PERFECT! Thanks for sharing 🙂
Pete
Nathan Duvall
January 16, 2017Thanks for the feedback, Pete!
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Steve
January 14, 2017Awesome! It’s such a pain the ass having to add overlays in Photoshop all the time.
Crazy that Elegant Themes don’t have this functionality built into the Section settings.
Thanks for the CSS!
Nathan Duvall
January 16, 2017Thanks, Steve. If ET doesn’t add this to the section settings at some point, we’d be surprised, but in the interim, this method will work. 🙂
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Steve Cooper
January 17, 2017Absolutely brilliant!
The code works perfectly and your explanation was quick and easy to follow.
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Raquel
January 17, 2017Genius! Cheers dude
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Javier
January 21, 2017Hey great article!!
I have a section with a background video at mostachomarketing.com. Can you please help me with the code I need to put a white overlay to the video?
Thanks
Nathan Duvall
January 24, 2017Hi Javier, the trick on your site is to add this to your background video section > custom css > after box:
content: ‘ ‘;
background: rgba(255, 255, 255, 0.5); /*define background color or add gradient CSS*/
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
Then you’ll need to make sure your header text is on top of the gradient, just add a z-index to the text row > custom CSS > main element box.
z-index: 1;
Hope this helps!
Gabriel Marusca
April 19, 2017Hi Nathan,
Thank you for this great tutorial. I’m trying to add an overlay background to a Fullwidth-Slider that has one video background slide.
I added the below code in the custom css> after for that particular slide with no effect:
content: ‘ ‘;
background: rgba(2, 34, 66, 0.7) !important;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
The website link is this: https://idc.marusca.tech/
Thank you in advance!
Nathan Duvall
May 11, 2017Hi Gabriel, what CSS selector were you targeting? What you have above works if you do something like this:
.md-fw-slider .et_pb_slide:before {
content: ”;
background: rgba(2, 34, 66, 0.7) !important;
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 1;
}
KC Clark
May 21, 2017Hi Nathan,
I’m trying to do the same thing here > http://thequiltsong.com/#the-song. I want to add an rgba (0, 0, 0, 0.43).
Is this possible? I’ve tried adding a code you suggested here, but it doesnt seem to be working.
Thanks,
KC
Jake Kramer
May 22, 2017Hey KC! Thanks for the comment 🙂 Have you added this to your “Custom CSS” section in “Divi > Theme Options” and cleared your cache? Also, have you tried adding the “!important” tag?
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
ALLAN TODD
January 27, 2017Hi
What is the name of the css inspector you are using
Thanks in advance
Allan
Nathan Duvall
January 27, 2017Hi Allan — most of us use Coda as our CSS editor and just the built-in Chrome Inspect Element as our CSS Inspector.
KL
March 15, 2017I’m sorry, this is a rather dummy question but if I want to use the code in my child theme instead of the “Before” section in the divi builder do I just copy and paste it as it is? Or do I have to add something more?
Jake Kramer
March 16, 2017Hey KL, It depends on the specific code. Sometimes you have to add the “:before” cap to the CSS class or element. It really just requires some playing with. Hope that helps!
KL
March 16, 2017Hey Jake, thanks for answering so fast! And in the case of this tutorial what code should I put to my child theme?
Jake Kramer
March 16, 2017KL, the code needed is in step 3.5. Click on “gimme that code!”. Is that what you mean?
KL
March 18, 2017haha, no I meant how to use the code you provided in the stylesheet of my child theme. But I already found it out! Thank you guys! You’re doing awesome job with these tutorials
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Kate Doster
April 4, 2017Thank you so much Jake. You have no idea how much this means to none coder DIYer like myself.
Jake Kramer
April 4, 2017Thanks, Kate! Glad it was of service to you 🙂
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Bethan Arundel
June 23, 2017Hey, I’m using paralax and the code is not working. Only when I disable the paralax. Any idea of what I’m doing wrong?
Nathan Duvall
August 12, 2017Hi Bethan, got a link to your site you can share? Happy to take a look.
Robb
August 17, 2017Hey Nathan,
I am having the same issue as Bethan Arundel. The code works on static images. It does not work on parallax. Here is a page I am having the issue with.
https://purposecenterchurch.com/giving-robb/
Terry Hale
September 3, 2017Hi Robb, thanks for reaching out.
Is section 3.5 in the article above not working out for you? I can’t see on your page where the classes discussed in the tutorial are.
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Vaibhav Dingre
June 27, 2017Hello,
I am new to using Divi Builder. Still, I have designed a full page for my site. Everything is OK but I want to add transparency or opacity to the background image of section module. I am tired of searching for it online. I can not write CSS codes as I am not aware of it. I just want to make module background image transparent so that the text on it looks better. Can anyone of you please suggest me how to achieve it using Divi Builder? I would really appreciate the help.
Thanks.
Haley Kramer
June 27, 2017Vaibhav, to make your image transparent, you’ll need to either 1) put it into a photo editing tool like Photoshop and reduce the opacity or 2) add a opacity: .5; line of CSS to your element to reduce the opacity in half. Good luck!
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Márcio
July 3, 2017Hey man great tutorial. It worked well for images.
But how can we make it work for video background? In my section, instead of an image I added a video to the background but it is too bright. How can I add an overlay to darken a bit?
I’m not asking how to add an overlay to a video module, it a normal section, with a video background.
Nathan Duvall
August 12, 2017Hi Márcio, it should work the same, regardless of whether or not you’re using a video background or not. Feel free to reply with a link to your site and we’ll be glad to take a look.
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Sam
August 17, 2017OMG Dude Thanks so much for the code and the video!!
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Kadir
August 19, 2017Thanks so much for the code.. I have a problem though, the code doesnt work when I enable parallax in the background image of a section. Can you help ?
Terry Hale
September 3, 2017Hi Kadir,
Are you having trouble getting section 3.5 above in the article to work for you? Do you have a link to the page you are working on?
Thanks for reaching out!
John Wooten
January 23, 2018Stay tuned Kadir… we’ll have a fix for this very soon… =)
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Bryan
October 20, 2017Great work! Love your work. I did notice there is a typo for the class. gray vs grey
In your text you have “Then change the section class to “grayOverlay”.” but in your code
you have “.greyOverlay, .greyOverlay:before”
Jake Kramer
October 23, 2017Thank you, Bryan! Good catch 🙂 It’s been edited.
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Brett
October 23, 2017I have used this on a blurb module with a background image that I won’t the overlay on.
The css works but the overlay extends past the image and into the space below – between a blurb on the same column.
I have tried removing the lower blurb and found the overlay continues to extend below the image.
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Doug Ison
January 6, 2018Thanks what a great help and why I love DIVI. Is there a CSS snippet to draw a diagonal color section across a page section? This would be where you have 2 colors going across to opposite coners e.g. upper left to lower right top half white and bottom half yellow ?
John Wooten
January 23, 2018Doug you can do this using Divi’s Gradient Background feature now. However we’re coming out with a video on how to do this very soon. =)
verum_est
January 11, 2018Thanks much on this great tutorial!! Funny thing though is that when I pasted the given code with the Parallax Mode in the Theme Options, it works! But not on the main Section’s Advanced option anymore… Not sure why, but my best bet is the theme version, because I’m currently using the latest(At the time of this writing). More importantly, I think this post needs some updating on the information provided to consider versioning control.
John Wooten
January 23, 2018Stay tuned verum_est… we’ll have a fix for this very soon… =)
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Marrell
January 20, 2018I’m using the latest version of Divi, and I’m sure I’m using the correct code for parallax, but I can’t get it to work at all with parallax.
If I disable parallax it works great. Could something have changed in the latest divi version?
John Wooten
January 23, 2018Stay tuned Marrell… we’ll have a fix for this very soon… =)
John Wooten
January 24, 2018We now offer a plugin that brings this feature to Image Backgrounds, Parallax Backgrounds, and Video Backgrounds. It’s much easier and quicker than writing code. It’s also a lot easier to update code. In fact, no code is needed. =)
Demo: http://madebysuperfly.com/divi-background-plus/
Purchase: https://besuperfly.com/product/divi-background-plus/
Robin
June 2, 2018THANK YOU! THANK YOU!! THANK YOU!!! I really needed this plugin. I tried everything, including the code. Nothing worked above my video. Y’all are AWESOME!
Dianne Emerson
September 4, 2018By reading this post now I don’t have any issue about overlays color divi section. So helpful for me. Thanks