Changing a Submenu to a Mega-menu with Beaver Builder

Code Snippet Related Categories

Reason for needing the Code Snippet

Sometimes you want to present a navigation menu as a horizontal “mega-menu” instead of a hierarchal dropdown menu. This is really simple if you are using Beaver Builder. The mega-menu feature is built in, but is unfortunately hidden. You have to know the secret to turn it on.

(This post was viewed 815 times) in the last month.)

What the Code Snippet does

Converts a submenu dropdown to a full-width horizontal mega-menu.

What the page looks like Before and After

Here's the Code Snippet


  • Step 1: make sure you turn on the CSS Classes in Screen Options when viewing your WordPress Menus
  • Step 2: for the parent menu item (for the submenus you want to be mega-menu) add "mega-menu" as the CSS Class (no quotes) In this example the Parent Menu Item is "Categories"
  • Step 3: Save your Menu
  • Step 4 if you want the mega-menu to be full width, then add the following CSS and tweak as necessary:

UL.fl-menu-horizontal LI.mega-menu > UL.sub-menu:after
 content: "";
 display: block;
 position: absolute;
 left: 50%;
 top: -1px;
 height: 101%;
 width: 100vw;
 transform: translateX(-50%);
 z-index: -1;
 box-sizing: border-box;
 border-top: 1px solid #efefef; 
 background-color: #efefef;
 /* This is for full width shadow.
 You need to turn off "sub-menu drop shadow" in the menu module.
 Remove this if not needed. */
 -moz-box-shadow: -2px 4px 9px 0 rgba(134, 134, 134, 0.451);
 -webkit-box-shadow: -2px 4px 9px 0 rgba(134, 134, 134, 0.451);
 box-shadow: -2px 4px 9px 0 rgba(134, 134, 134, 0.451); 


Limit search for phrases by using " " around the phrase

Subscribe to Code Snippet updates

You will get an email the morning after we post a new Code Snippet

Something went wrong. Please check your entries and try again.

Other Recent Code Snippets

WordPress site migration, copying your site and moving it 1

WordPress site migration, copying your site and moving it

Posted in , , , , ,

There are several reasons why you might want to copy your website,

you want to make a “sandbox” copy to experiment on, without affecting the public-facing production site
you want to change hosting companies to get a better deal, faster performance or more functionality
having a complete copy of your website is a great insurance policy should something happen to your host and your site is lost.

Read More
Are your website pages loading slowly? This might help... 2

Are your website pages loading slowly? This might help…

Posted in , , , , ,

Jetpack Photon should help I recommend Jetpack-Photon module (deactivate all the other Jetpack modules you don’t use). Photon is an image-only CDN solution using Automatic’s servers. All your images are uploaded to their servers the next time the image is served after you activate Photon. Subsequently the images are served […]

Read More
2-column videos test 3

2-column videos test

Posted in , ,

Using column shortcodes to make 2 columns didn’t work for this post. But I was able to do this on a Page (instead of a Post) using the theme’s 2-column page template.

See the succesful results at: Multi-column video test page

Read More
It's OK to go ahead now... WARNING! Don't update BackWPup plugin to version 3.x yet It's OK to go ahead now... 4

It's OK to go ahead now… WARNING! Don't update BackWPup plugin to version 3.x yet It's OK to go ahead now…

Posted in , , , ,

BackWPup plugin developer, Daniel Huesken has decided to begin offering a “Pro” version beginning with version 3.0 of the plugin. I don’t have a problem with this and in some cases might recommend the Pro version to some of my clients. All the issues I had with the switch to version 3.0 […]

Read More

Markup: HTML Tags and Formatting

Posted in

Headings Header one Header two Header three Header four Header five Header six Blockquotes Single line blockquote: Stay hungry. Stay foolish. Multi line blockquote with a cite reference: People think focus means saying yes to the thing you’ve got to focus on. But that’s not what it means at all. […]

Read More
I Am Worth Loving Wallpaper

Markup: Image Alignment

Posted in

Welcome to image alignment! The best way to demonstrate the ebb and flow of the various image positioning options is to nestle them snuggly among an ocean of words. Grab a paddle and let’s get started. On the topic of alignment, it should be noted that users can choose from […]

Read More

Pieter Hartsook

WordPress website coaching, design, implementation, support, and training. Background in Marketing Research and Communications. See my profile at:

Reader Interactions

Leave a Reply

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

Skip to content