How To Create A Divi Mega Menu (Without Plugins)

Learn how to create a Divi mega menu without plugins and how to style and customize the design of the mega menu with CSS.

What Is A Divi Mega Menu?

When a normal Divi menu item has additional menu items underneath it, we call those sub-items a submenu. So think of a mega menu as a set of multiple submenus side by side. We can create a mega menu by setting up our menu in such a way that it has multiple sets of menu item tiers. This is useful when we have a lot of items to put in our menu, or we just want to nest certain pages or sets of pages in a specific way. You can also use a mega menu to advertise products, featured services, or blog posts.

We wrote all about how to style the Divi submenu in a recent tutorial, so go check that out. It will definitely help you understand and style the mega menu!

Set Up The WordPress Menu

Creating mega menu in Divi starts with setting up the WordPress navigation. You can add whatever menu items you want, that’s not important. The important part is that you set it up in the correct order of hierarchy.

Setting up your Divi mega menu navigation

Here’s how that looks by default. The parent menu item has four submenu items under it.

how to make a Divi mega menu without plugins

Add The Mega Menu CSS Class

This is how the standard menu works, but in order to create a mega menu, we need to add as secret CSS class to the parent item.

NOTE: Be sure you have “CSS Classes” checked under “Screen Options” in the upper right corner of your admin screen.

add mega menu css clas to Divi menu

Here’s how it looks now that we added the “mega-menu” CSS class to the parent menu item:

preview of the Divi mega menu creation in progress

Add Additional Submenu Items

Next, proceed to add all your submenu items underneath each “column.” You can add as many as you need. In my example, I added three under each column.

structure of the menu items for the Divi mega menu

Here’s how your Divi mega menu looks! 

how to creat a Divi mega menu

How To Style The Divi Mega Menu

Now that we have created our Divi mega menu, we need to customize how it looks. To do this, we need to use CSS since there are no built-in settings for this in Divi. The cool part is that we can base our CSS off of our Divi submenu tutorial since many of the classes are the same.

  • Unordered List
  • List Item
  • Link

This still holds true! The only difference now is that each of the submenu list items now have an unordered list underneath them.

How To Customize And Style The Divi Mega Menu Submenu

You can do some things in the module settings, such as the background color. But to do anything beyond that, you can use our snippets and suggestions shown below to style and customize the Divi mega menu submenu.

How To style the Divi Mega menu

Edit The Overall Mega Menu

This would be exactly like our submenu tutorial, but remember, we added the class “mega-menu” to the list item.

Once you have our CSS selector ready, you can start adding custom code where it says “YOUR CSS HERE.” (be sure to remove that text)

Custom Style Ideas

The following is a list of ideas of some things you might want to do to style overall mega menu submenu. You can choose to do this by placing the snippets shown below into the selector for the mega menu shown above.

Add a border:

Make the corners rounded:

Adjust the spacing:

How To Customize And Style The Divi Mega Menu Submenu First Row

The next thing you may want to customize and style with the Divi mega menu is the first row. You don’t have to do this separately than the other list items, but it often works out well. You can see our site menu for an example of this in action.

How To style the first row of the Divi Mega menu

Edit The Mega Menu Submenu First Row

To do this, we are taking the CSS class for all the menu list items and adding a new special pseudo class called “first-child” which only targets the list items in the top row.

Edit The Mega Menu Submenu First Row On Hover

Once you have our CSS selector ready, you can start adding custom code where it says “YOUR CSS HERE.” (be sure to remove that text)

Custom Style Ideas

The following is a list of ideas of some things you might want to do to style the first row of mega menu submenu list items. You can choose to do this by placing the snippets shown below into the selector for the mega menu shown above.

Add a border:

Change the background size:

Change the text color:

Change the text size:

Adjust the font weight:

How To Customize And Style The Divi Mega Menu Submenu List Items

You may be wondering why the tutorial ends here? That’s because we’ve already covered how to style and customize the Divi submenu in our other tutorial (that we keep talking about), so we don’t need duplicate content. You can now go and use that tutorial for anything related to the list items and links, and they will work perfectly here in the Divi mega menu.

You may also want to add images to your mega menu. You can do that with another tutorial about adding images to the Divi menu.

Please share this post!

Nelson Lee Miller (aka The Divi Teacher)

Nelson is the owner of Pee-Aye Creative Co in the beautiful state of Pennsylvania. He loves helping small businesses, exploring, building websites with Divi, and teaching others.

Join Our NEW Divi Facebook Group!

The Divi Teacher Logo

Related Posts

Leave A Response!

8
Leave a Reply

avatar
  Subscribe  
newest oldest most voted
Notify of
Thomas Neumeister

Thx for this very good tutorial! I would like to see something for the mobile menu with nested childs? Is ther something existimg i could use?
Best Regards,
Thomas

Guillermo
Guillermo

Thank’s Nelson, great video.

Regards

Jenn
Jenn

This is great! CSS is not my strong point, so I really appreciate the explanation to understand what each code piece does so I can change what I need to change to make it look how I want it to look on my site, instead of just following a tutorial to make it look just like ‘yours’.

Shahzad Raza

Thank’s Nelson for writing useful content on Mega Menu.

Shop Our Divi Products!

Child Themes • Plugins • Layouts

Visit The Shop

Divi Tutorials On YouTube

Subscribe to our helpful Divi videos!

Visit Our Channel

Pin It on Pinterest

0

Your Cart