How to Create a Global Transparent Floating Menu Bar with Divi’s Theme Builder

Last Updated on September 16, 2022 by 21 Comments

How to Create a Global Transparent Floating Menu Bar with Divi’s Theme Builder
Blog / Divi Resources / How to Create a Global Transparent Floating Menu Bar with Divi’s Theme Builder
Play Button

Looking for a way to put your global header on top of your pagesโ€™ hero sections? In todayโ€™s Divi tutorial, weโ€™ll show you exactly how to do that. Weโ€™ll recreate a stunning global header from scratch (using Diviโ€™s Theme Builder) and weโ€™ll apply a floating effect to the menu bar. 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

floating menu bar

Mobile

floating menu bar

Download The Floating Menu Bar Global Header Template for FREE

To lay your hands on the floating menu bar 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.

Subscribe To Our Youtube Channel

1. Go to Divi Theme Builder & Add New Template

Go to Divi Theme Builder

Start by going to the Divi Theme Builder.

floating menu bar

Start Building Global Header

Then, click on โ€˜Add Global Headerโ€™ and continue by selecting โ€˜Build Global Headerโ€™.

floating menu bar

2. Start Building Global Header

Section Settings

Background Color

Once youโ€™re inside the template editor, youโ€™ll notice a section on the page. Open that section and change the background color into a completely transparent one. This will allow everything below the section to show through.

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

floating menu bar

Sizing

Go to the sectionโ€™s design tab next and change the width.

  • Width: 100%

floating menu bar

Spacing

Remove all default top and bottom padding too.

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

floating menu bar

Z Index

And to make sure the section remains on top off all hero section content, weโ€™ll need to increase the sectionโ€™s z index in the visibility settings.

  • Z Index: 99999

floating menu bar

Add New Row

Column Structure

Once youโ€™ve completed the section settings, you can add a new row using the following column structure:

floating menu bar

Sizing

Without adding any modules yet, open the row settings and change the sizing settings as follows:

  • Equalize Column Heights: Yes
  • Width: 100%
  • Max Width: 100%

floating menu bar

Spacing

Add some custom top and bottom padding next.

  • Top Padding: 2vw
  • Bottom Padding: 0vw

floating menu bar

Main Element

Then, go to the advanced tab and make sure the columns remain next to each other on smaller screen sizes by adding one single line of CSS code to the rowโ€™s main element.

display: flex;

floating menu bar

Column 2

Background Color

Continue by opening the column 2 settings and change the background color into a semi-transparent one.

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

floating menu bar

Border

Add a bottom border to the column too.

  • Bottom Border Width: 2px
  • Bottom Border Color: #f4583f

floating menu bar

Box Shadow

And create a floating effect by adding a subtle box shadow.

  • Box Shadow Vertical Position: 20px
  • Box Shadow Blur Strength: 50px
  • Box Shadow Spread Strength: -20px
  • Shadow Color: rgba(0,0,0,0.23)

floating menu bar

Add Image Module to Column 1

Upload Logo

Once youโ€™ve completed the row and column settings, itโ€™s time to add the modules, starting with an Image Module in column 1. Upload a logo with a transparent background.

floating menu bar

Alignment

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

  • Image Alignment : Center

floating menu bar

Sizing

Change the moduleโ€™s width in the sizing settings too.

  • Width: 8vw (Desktop), 14vw (Tablet), 21vw (Phone)

floating menu bar

Add Menu Module to Column 2

Select Menu

On to the next column. There, the only module we need is a Menu Module. Select a menu of your choice.

floating menu bar

Remove Background Color

Then, go to the background settings and remove the background color.

floating menu bar

Layout

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

  • Style: Centered
  • Dropdown Menu Direction: Downwards

floating menu bar

Menu Text

Style the menu text settings too.

  • Menu Font: Muli
  • Menu Text Color: #6f6666
  • Menu Text Size: 1vw (Desktop), 2vw (Tablet), 3vw (Phone)

floating menu bar

Dropdown Menu

Change the dropdown menu settings next.

  • Dropdown Menu Line Color: #f4583f

floating menu bar

Icons

Use that same color for the hamburger menu icon color in the icons settings.

  • Hamburger Menu Icon Color: #f4583f

floating menu bar

Spacing

Complete the moduleโ€™s settings by adding some top and bottom padding in the spacing settings.

  • Top Padding: 1.5vw
  • Bottom Padding: 1.5vw

floating menu bar

Add Button Module to Column 3

Add Copy

On to the next and last column. Add a Button Module with some copy of your choice.

floating menu bar

Alignment

Change the moduleโ€™s alignment next.

  • Button Alignment: Center

floating menu bar

Button Settings

Continue by styling the button accordingly:

  • Use Custom Styles For Button: Yes
  • Button Text Size: 0.9vw (Desktop), 1.5vw (Tablet), 2.5vw (Phone)
  • Button Text Color: #ffffff
  • Button Background Color: #f4583f
  • Button Border Width: 0px
  • Button Border Color: #f4583f
  • Button Border Radius: 0px

floating menu bar

  • Button Font: Muli
  • Button Font Weight: Bold

floating menu bar

Spacing

And complete the moduleโ€™s settings by adding some custom padding across different screen sizes.

  • Top Padding: 1vw (Desktop), 2vw (Tablet), 3vw (Phone)
  • Bottom Padding: 1vw (Desktop), 2vw (Tablet), 3vw (Phone)
  • Left Padding: 2vw (Desktop), 3vw (Tablet), 4vw (Phone)
  • Right Padding: 2vw (Desktop), 3vw (Tablet), 4vw (Phone)

floating menu bar

Additional Section Settings

Default Main Element

Once youโ€™ve completed the overall design, thereโ€™s one thing left to do; placing the section on top of your page content. To do that, weโ€™ll need to add two lines of CSS code to the sectionโ€™s main element.

position: absolute;
top: 0;

floating menu bar

Hover Main Element

Make sure you add those same lines of CSS code to the hover option of the main element. This will prevent the section from flickering once you hover it.

position: absolute;
top: 0;

floating menu bar

3. Save Builder Changes & View Result

Once youโ€™ve completed the section, you can save the global header and view the result on your website!

floating menu bar

floating menu bar

Preview

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

Desktop

floating menu bar

Mobile

floating menu bar

Final Thoughts

In this post, weโ€™ve shown you how to create a floating menu bar with Diviโ€™s Theme Builder. This is a great way to blend your header and hero sections. The header is placed on top of the first section on your page or post. 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

New Starter Site for Estheticians (Quick Install)

New Starter Site for Estheticians (Quick Install)

Posted on November 12, 2024 in Divi Resources

Divi empowers you to build the best websites possible, and now, Divi Quick Sites takes website creation to a whole new level. This revolutionary tool lets anyone, regardless of skill level, generate a complete website in under two minutes! Divi Quick Sites provides everything you need to launch...

View Full Post
Divi 5 Update: Public Alpha Version 3

Divi 5 Update: Public Alpha Version 3

Posted on November 11, 2024 in Divi Resources

The Divi 5 Public Alpha is available for testing. As we progress towards the final release, we’ll update Divi 5 every two weeks, appearing as a standard update in your WordPress dashboard. If you use Divi 5, you’ll notice an update notification for Public Alpha Version 3ย today. Thanks...

View Full Post

21 Comments

  1. So, even though padding-top was set to “0px” for the header section, there is still padding set by other Divi CSS somewhere. If I want to have the top of the navigation section coincide with the top of the browser viewport, how do I do that?

    • Hi! I suggest that you contact our Support Team by opening a chat using the pink circle button floating at the bottom and then share your website URL with them so they can inspect this CSS you’re referring to and help you further.

  2. Hello.
    Where can I upload the json file? When I add it to the Divi library, then it says “This file should not be imported in this context.”.

    • Since the layout is for a custom menu header, the JSON file should be imported in Divi > Theme Builder. Here’s a screenshot: https://prnt.sc/jx3799opoP_g

  3. Hi Donjete,
    such a great post,
    i can’t Add a new row, please help me on that.

  4. I’m having trouble getting back to the Section Settings. What am I missing?

    • If you’re having trouble opening settings of a certain element, you can always switch over to wireframe mode and access the settings that way. Hope that helps!

  5. how can i create a mega menu by category with the theme builder

  6. I added the template and looked fine but decided against using with the current site so deleted but now I don’t see the main menu at all.

    • Make sure you delete the header on all templates you’re using inside the theme builder. Hope that helps!

  7. Please create number and social media icon in header also.

    • You can easily modify the design to include things like social media icons; simply insert the correct module (perhaps the Social Media Follow module, in this case) and style to your liking. You could easily, for example, use that instead of the CTA button in the 3rd column.

  8. This is a sweet tutorial. ET nailed it again and I can’t help to feel zero regret moving from Elementor to Divi!

    • Happy you’re enjoying the tutorial + Divi! ๐Ÿ™‚

  9. Quick question: your tutorial was very clear, concise and it worked first time on a site I am working on. However, I would like the floating menu to remain visible at the top of the desktop viewport while scrolling. As it is now, it scrolls up & out of sight as I scroll the page.

    Probably just a bit of CSS – hints?

    Bill

    • Sorry – had an “oh duh” moment and fixed it.
      used “fixed” instead of “absolute” in custom CSS.

      • Yup, you can just change the position CSS property! ๐Ÿ™‚

        • I cannot find where the custom CSS was added to be able to change absolute to fixed. Please help

          • it’s in the section settings, just change
            position: absolute;
            top: 0;

            to
            position: fixed;
            top: 0;

  10. Nice header Donjetรซ. Would love to see some new designs for category and product pages. Is this something that is coming soon?

    • Thanks, Robin! We’ll definitely create more tutorials on category and product pages! ๐Ÿ™‚

Leave A Reply

Comments are reviewed and must adhere to our comments policy.

Join To Download Today