How to Make Your Transparent Header Sticky on Scroll with Divi

Last Updated on September 16, 2022 by 21 Comments

How to Make Your Transparent Header Sticky on Scroll with Divi
Blog / Divi Resources / How to Make Your Transparent Header Sticky on Scroll with Divi

When it comes to setting up a global header for your website, there are many ways to approach it. One of the more subtle approaches is a transparent header. Transparent headers are placed on top of your pagesโ€™ hero sections, which can lead to beautiful designs that focus on a minimal but clear approach. If you decide to go for a transparent header but need a sticky header on scroll, youโ€™re going to love this tutorial. Using Divi and its built-in sticky options, weโ€™ll show you how to go from a transparent header to a differently-styled sticky header on scroll. The transition between transparent and sticky is effortless! Youโ€™ll be able to download the JSON file for free as well.

Letโ€™s get to it.

Preview

Before we dive into the tutorial, letโ€™s take a quick look at the outcome across different screen sizes.

Desktop

transparent header

Mobile

transparent header

Download The Global Header Template for FREE

To lay your hands on the free global header template, you will first need to download it using the button below. To gain access to the download you will need to subscribe to our newsletter by using the form below. As a new subscriber, you will receive even more Divi goodness and a free Divi Layout pack every Monday! If youโ€™re already on the list, simply enter your email address below and click download. You will not be โ€œresubscribedโ€ or receive extra emails.

1. Building The Header Element Structure Inside a New Header Template

Create New Global Header Template

Start by going to the Divi Theme Builder. There, start building a new global or custom header.

transparent header

transparent header

Section #1 Settings

Background Color

Once inside the template editor, youโ€™ll notice a section. This section will be dedicated to the top header bar that you can notice in the preview of this post. Open the sectionโ€™s settings and add a black background color.

  • Background Color: #000000

transparent header

Spacing

Move on to the sectionโ€™s design tab and remove all default top and bottom padding.

  • Top Padding: 0px
  • Bottom Padding: 0px

transparent header

Add New Row

Column Structure

Continue by adding a new row using the following column structure:

transparent header

Add Text Module to Column

Add Content

Add a Text Module to the rowโ€™s column and enter some copy of your choice.

transparent header

Text Settings

Move on to the moduleโ€™s design tab and change the text settings accordingly:

  • Text Font: Oswald
  • Text Font Style: Uppercase
  • Text Color: #ffffff
  • Text Size:
    • Desktop: 19px
    • Tablet: 18px
    • Phone: 16px
  • Text Alignment: Center

transparent header

Add Section #2

Spacing

Right below the first section, add another regular section. This section will be dedicated to our transparent menu thatโ€™ll be turned sticky on scroll. Open the section settings and remove all default top and bottom padding in the design tab.

  • Top Padding: 0px
  • Bottom Padding: 0px

transparent header

Add New Row

Column Structure

Continue by adding a new row using the following column structure:

transparent header

Transparent Background Color

Open the row settings and apply a completely transparent background color to the row.

  • Background Color: rgba(255,255,255,0)

transparent header

Sizing

Move on to the rowโ€™s design tab and modify the sizing settings.

  • Use Custom Gutter Width: Yes
  • Gutter Width: 1
  • Width: 100%
  • Max Width: 100%

transparent header

Spacing

Add some custom left and right padding next.

  • Left Padding: 10%
  • Right Padding: 10%

transparent header

Box Shadow

Then, apply a transparent box shadow. Later on the tutorial, weโ€™ll use this box shadow in a sticky state with a different shadow color.

  • Box Shadow Blur Strength: 50px
  • Shadow Color: rgba(0,0,0,0)

transparent header

Position

To make sure the row appears on top of the page content, with a transparent background, weโ€™ll use an absolute position for our row in the advanced tab.

  • Position: Absolute
  • Location: Top Left

transparent header

Column 2 Visibility

Weโ€™re also hiding the second column of our row on tablet and phone to have a less complex header design on smaller screen sizes.

transparent header

Add Menu Module to Column 1

Select Menu

Now that our row settings are in place, itโ€™s time to add modules, starting with a Menu Module in column 1. Select a menu of your choice.

transparent header

Upload Logo

Upload a logo next.

transparent header

Remove Background Color

Remove the moduleโ€™s background color too.

transparent header

Menu Text Settings

Move on to the moduleโ€™s design tab and change the menu text settings accordingly:

  • Menu Font: Oswald
  • Menu Font Weight: Bold
  • Menu Font Style: Uppercase
  • Menu Text Color: #efefef
  • Menu Text Size: 18px
  • Text Alignment: Right

transparent header

Dropdown Menu Settings

Change the dropdown menu settings too.

  • Dropdown Menu Line Color: rgba(0,0,0,0)
  • Mobile Menu Background Color: rgba(0,0,0,0.95)

transparent header

Icons Settings

Then, change the icon colors in the icons settings.

  • Shopping Cart Icon Color: #ffffff
  • Search Icon Color: #ffffff
  • Hamburger Menu Icon Color: #ffffff

transparent header

Logo Settings

Weโ€™re changing the color of our logo in the logo settings too by changing the image invert filter.

  • Image Invert: 90%

transparent header

Sizing

Then, weโ€™ll assign a max height to our logo.

  • Logo Max Height: 40px

transparent header

Spacing

Next, weโ€™ll add some top and bottom padding on smaller screen sizes.

  • Top Padding:
    • Tablet & Phone: 10px
  • Bottom Padding:
    • Tablet & Phone: 10px

transparent header

Add Button Module to Column 2

Add Copy

In column 2, the only module we need is a Button Module. Add some copy of your choice.

transparent header

Button Alignment

Move on to the moduleโ€™s design tab and change the button alignment.

  • Button Alignment: Right

transparent header

Button Settings

Style the button next.

  • Use Custom Styles For Button: Yes
  • Button Text Size: 16px
  • Button Text Color: #ffffff
  • Button Background Color: #ed4441
  • Button Border Color: #ed4441

transparent header

  • Button Border Radius: 0px
  • Button Letter Spacing: 4px
  • Button Font: Oswald
  • Button Font Weight: Bold
  • Button Font Style: Uppercase
  • Show Button Icon: Yes
  • Button Icon Color: #1a1a1a

transparent header

Spacing

And complete the module settings by adding some custom spacing values.

  • Top Margin: -70px
  • Top Padding: 25px
  • Bottom Padding: 25px

transparent header

2. Apply Custom Sticky Effects

Turn Section #2 Sticky

Now that weโ€™ve set the foundation of our header, itโ€™s time to apply the sticky effect! To do that, start by opening the second sectionโ€™s settings and apply the following sticky settings to the advanced tab:

  • Sticky Position: Stick to Top
  • Sticky Top Offset: 0px
  • Bottom Sticky Limit: None
  • Offset From Surrounding Sticky Elements: Yes
  • Transition Default and Sticky Styles: Yes

transparent header

Sticky Row Background Color

Now that the sticky option is enabled, we can make sticky design changes to all the elements inside the section. Weโ€™ll start by opening the row containing of our menu and apply a white sticky background color.

  • Background Color: #FFFFFF

transparent header

Sticky Row Spacing

Next, weโ€™ll modify the rowโ€™s sticky spacing values.

  • Top Padding: 0px
  • Bottom Padding: 0px

transparent header

Sticky Row Box Shadow

Weโ€™re changing the box shadow color in a sticky state too.

  • Shadow Color: rgba(0,0,0,0.08)

transparent header

Sticky Row Positioning

Then, weโ€™ll bring back the row positioning to relative in a sticky state.

  • Position: Relative
  • Offset Origin: Top Left

transparent header

Sticky Menu Text Settings

Next, weโ€™ll change the sticky menu text color.

  • Menu Text Color: #000000

transparent header

Sticky Menu Dropdown Settings

Along with the mobile menu background color in the menu dropdown settings.

  • Mobile Menu Background Color: #ffffff

transparent header

Sticky Menu Icon Colors

Change the icon colors in a sticky state too.

  • Shopping Cart Icon Color: #000000
  • Search Icon Color: #000000
  • Hamburger Menu Icon Color: #000000

transparent header

Sticky Logo Filter

Then, remove the logo image invert filter in a sticky state.

  • Image Invert: 0%

transparent header

Sticky Button Spacing

And complete the tutorial by removing the buttonโ€™s negative top margin while sticky.

  • Top Margin: 0px

transparent header

Preview

Now that weโ€™ve gone through all the steps, letโ€™s take a final look at the outcome across different screen sizes.

Desktop

transparent header

Mobile

transparent header

Final Thoughts

In this post, weโ€™ve shown you how to combine Diviโ€™s Theme Builder with the new sticky options. More specifically, weโ€™ve shown you how to go from a transparent header to a differently-styled sticky header on scroll. This approach allows you to merge your page design with your menu while still keeping a beautiful sticky header on scroll. You were able to download the JSON file for free as well! If you have any questions or suggestions, feel free to leave a comment in the comment section below.

If youโ€™re eager to learn more about Divi and get more Divi freebies, make sure youย subscribe to our email newsletterย andย YouTube channelย so youโ€™ll always be one of the first people to know and get benefits from this free content.

Divi Marketplace

Are You A Divi User? Find Out How To Get More From Divi! ๐Ÿ‘‡

Browse hundreds of modules and thousands of layouts.

Visit Marketplace
Divi Marketplace
Divi Cloud

Find Out How To Improve Your Divi Workflow ๐Ÿ‘‡

Learn about the new way to manage your Divi assets.

Get Divi Cloud
Divi Cloud
Divi Hosting

Want To Speed Up Your Divi Website? Find Out How ๐Ÿ‘‡

Get fast WordPress hosting optimized for Divi.

Speed Up Divi
Divi Hosting
Premade Layouts

Check Out These Related Posts

Mastering Global Colors In Divi 5

Mastering Global Colors In Divi 5

Posted on March 10, 2026 in Divi Resources

Divi 5 improves color management for WordPress websites by introducing a variable-based color system designed for modern, scalable workflows. At its core is a redesigned Color Picker integrated with Design Variables, leveraging HSL (Hue, Saturation, and Lightness) and Relative Colors to create...

View Full Post
WooCommerce And Divi 5: The Complete Ecommerce Guide

WooCommerce And Divi 5: The Complete Ecommerce Guide

Updated on March 9, 2026 in Divi Resources

Building an online store used to mean balancing design and functionality. You wanted a store that looked polished, felt on-brand, and worked smoothly at checkout, but achieving all three often took extra effort. Divi and WooCommerce have long been a strong combination for building online stores,...

View Full Post
How To Make The Most Of Divi 5’s Best New Features

How To Make The Most Of Divi 5’s Best New Features

Posted on March 7, 2026 in Divi Resources

Divi 5 is here, and to make the most of its best new features, it helps to approach the builder a little differently than before. This is not just a faster version of Divi or a visual refresh. It is a rebuild that changes how layout, styling, and structure work together. Many of Divi 5โ€™s biggest...

View Full Post

21 Comments

  1. No matter where I tried to add the json, I got an error: This file should not be imported in this context.

  2. The sticky menu works on scroll but the transparent one doesn’t.

  3. Thanks for the tutorial, Donjete. I’m unable to import the template (json) file into the Divi Layouts library. I get an error message “this file could not be imported in this context”?

    • if you just import the Zip file it does’nt work ! extract first the json file and then import it !

    • I am very surprised that no one has replied this post for years now.

    • me too

  4. Nice One

  5. Hi Donjete, I’m using a one page design with anchor links. Unfortunately, there has been a year long error in Divi. Also, setting Responsive Breakpoints doesn’t work with old solutions anymore, either.

  6. thank you for the tutorial step by step

  7. Thank you so much for the tutorial. I tried it and it works perfectly on desktop but the mobiles are non responsive.

  8. it wont let me load the JSON file?

  9. Fantastic!! Thanks for this.

  10. Perfect – I like that. Works perfectly! Thank you Donjete.
    I have one issue: I want to use “DIVI Booster” plugin’s option “Set mobile content width” to 90% (default is 80% I think) to reduce DIVI’s left/right margin on mobile. But with that also the created header SHRINKS to 90% on mobile (instead of 100%) and so leaves a gap at the right.
    I can’t find the CSS which I can add that 100% again – do you? Or is there quite another option to change the left/right margins on mobile?
    Best regards, Gregor

  11. Doesn’t work on Extra. Can you solve it please?

  12. Hello, please how to do the same thing but without the first black section on top and keeping the menu background transparent above photo?

  13. I’ve tried this on numerous sites, and as soon as I save the sticky positioning items, sticky options disappear and the section doesn’t stick.

  14. Thank u so much!

    • You’re welcome, Joe! Happy you liked the tutorial ๐Ÿ™‚

  15. Thanks for this tutorial! My question is: is it possible to leave also the first section with text sticky on scroll? Thanks!!

    • Yes! You can turn the first section sticky as well ๐Ÿ™‚

Leave A Reply

Comments are reviewed and must adhere to our comments policy.

Join To Download Today