How to display Divi Menu module vertically on all screen widths

Create vertical navigation in the footer using the standard Menu Module in Divi

Divi’s Menu Module, by default, uses the horizontal layout, was designed for the Header as the horizontal navigation. But there are certain situations (when creating a Footer or a Sidebar layout, for example) when we’d like to display all the menu items vertically, as a simple list of links, without the hamburger mobile menu version.

Yes – we can use the Text module and add our list of links manually, but using the WordPress Menus when selecting links is more user-friendly and opens up additional possibilities.

In this short walkthrough, I’ll show you how to use a few lines of CSS to change the default Menu module appearance and how to add a fun hover effect to your menu links!

This Sample Footer Layout is available to download for free to our subscribers.

Free Resources for Divi Lovers

Join our newsletter to get the good stuff!

We’ll provide you with updates on new tutorials, webdesign assets and special offers. Get top quality Divi goodies straight into your inbox! Read our Privacy Policy to learn how we manage and protect your submitted information.

Sign up to download

Get access to this layout and all the free resources made exclusively for our subscribers!

Already subscribed?

Fill the signup form and if you’re on the list it’ll get you straight to the download page! 

Can’t see the form? Click here

Change the Menu alignment with CSS

To target a specific module, and not all Menus on the entire website, we’ve added a custom CSS Class in the Menu’s Settings, Advanced section: dl-v-menu. This bit of CSS changes the alignment of that menu and hides the default Mobile menu version with the hamburger icon.

.dl-v-menu .et_pb_menu_inner_container,
.dl-v-menu .et_pb_menu__wrap,
.dl-v-menu .et_pb_menu__menu,
.dl-v-menu.et_pb_menu .et_pb_menu__menu>nav,
.dl-v-menu.et_pb_menu .et_pb_menu__menu>nav>ul {
    display: block;
}

.dl-v-menu .et_mobile_nav_menu {
    display: none;
}

Add hover effect to Menu items

Here’s an example of a fun hover effect, which adds a gray animated line next to the menu item and slighly moves the link to the right.

.dl-v-menu a:before {
    content: '';
    background: gray;
    display: block;
    position: absolute;
    width: 10px;
    height: 2px;
    top: .6em;
    left: -20px;
    opacity: 0;
    transition: all .3s ease-in-out;
}

.dl-v-menu a:hover:before {
    left: -10px;
    opacity: 1;
}

.dl-v-menu a:hover {
    padding-left: 5px;
}

Final Thoughts

Don’t forget to check out the demo page to see the sample footer layout and vertical menu navigation with the hover effect in action!

Sign up for the newsletter so you don’t miss out on any Divi tutorials. Also, keep an eye out for future Divi freebies. If you’re a subscriber feel free to download the Footer layout I created as an example.

As always please leave a comment with your thoughts below! I hope you’ll find this helpful.

Shares

Have you seen our

Divi child themes?

Divi Toolbox plugin?

We offer a great selection of high-quality Divi products to speed up your work. Feel free to use a coupon code IREADBLOG at the checkout to get a 10% discount!

23 Comments

  1. Dhaval

    Thank you for this wonderful tutorial. Can you please provide Javascript code so we can make submenu open open on click. Thank you

    Reply
  2. Ocean

    Download link doesn’t work just loops.
    Also subscribe to newsletter link does not work either. It just sends to a blank page.

    This is my first time here and I love the design of this site, however broken links I never good. Especially when it’s on a page that is supposed to be a tutorial for menus and links

    Reply
    • Ania Romańska

      Hello Ocean,
      I’m sorry to hear you have trouble accessing the free layout. I checked and it looks like your email address is already on our list, so if you fill the sign up form, it should redirect you to the download page automatically.

      Reply
  3. Will Slegg

    Hi, I had two question about using this – currently the nested menu only lets me click on the lower most child menu item, so the top level isnt clickable as a link – is it possible to do this?

    Also, is it possible to have them collapsible – so that you can click the parent element or open the sub menu?

    Many thanks in advance 🙂

    Reply
    • Ania Romańska

      Hi Will,
      Yes, I’m afraid this solution doesn’t really work well with sub-menus. We’re going to have a separate tutorial on this, as it’s pretty complex and would be difficult to explain in the comments. Stay tuned 😉

      Reply
  4. Ghita

    Hello, I have a problem with the the vertical menu. I would like to align the vertical menu to the h2 “MENU” but I can find the solution. I have tried text-align and other functions but the menu still being aligned to the right. How can I do it?
    Thank you!

    Reply
  5. landyvlad

    Are you able to show which part of the css does which thing?
    Specifically I assume this part is the dash which appears?
    width: 10px;
    height: 2px;
    could that be replaced with a character, say a bullet point or arrow?

    Reply
    • Ania Romańska

      We’re doing it step by step in the video, so the CSS should be clear 😉 To change the dash to an icon, you’d need a “content” and a “font-family” property on the ::before element.

      Reply
  6. Stephanie

    This is perfect Ania, especially in combination with the Canvas header (second section). Is there also a way to have submenu items? I have submenu items in my menu, but it shows one list now.

    Reply
    • Ania Romańska

      Hi Stephanie,

      This bit of code would display the submenus underneath each parent menu item:

      .dl-v-menu.et_pb_menu ul.sub-menu {
          opacity: 1;
          visibility: visible;
          position: relative;
          border:none;
          box-shadow: none;
          width:100%;
          padding:0 0 0 10px;
          display:block;
          left:0;
          top: 0;
      }
      
      .dl-v-menu.et_pb_menu li.menu-item {
          display: block;
      }
      
      .dl-v-menu .sub-menu li.menu-item {
          padding: 0;
      }
      
      .dl-v-menu.et_pb_menu ul.sub-menu a {
          width:100%;
          display:inline-block;
          padding:0;
      }
      .dl-v-menu li.menu-item-has-children>a:first-child:after {
          display:none;
      }

      To make it collapisble, we would also need to add some JavaScript (I will create a separate tutorial about it).

      Reply
      • Jens

        Super Lösung, vielen Dank! Ich habe ebenfalls Untermenüpunkte und würde sie gerne rechts zur Seite ausklappen:)

      • Stephanie

        Thank you Ania!

  7. dom

    greetings,

    this is exactly what i needed and solved my problems! i noticed in the visual builder, when it resizes for mobile dimensions the featured images in the filterable portfolio become inverted.

    Reply
  8. Nick

    Hi Ania
    This looks fantastic and is just what I am looking for. but when i try and upload it just hangs at 99% and doesn’t finish the import

    Reply
  9. Ernst

    I love this! But how can I get the text to right align instead of left align? With display:block; the text-align:right; doesn’t work 🙁

    Reply
    • Ania Romańska

      You probably just needed a more specific selector. Try with this:

      .dl-v-menu.et_pb_menu .et_pb_menu__menu>nav>ul>li {
          text-align: right;
          display: block;
      }
      Reply
      • Ernst

        Ah, perfect. That worked!

  10. Jean

    I love this! Thanks for providing this code. Quick question… how do I center this on mobile?

    Reply
    • Ania Romańska

      Something like this should do it:

      @media (max-width:980px) {
          .dl-v-menu ul.et-menu li {
              justify-content: center;
          }
      }
      Reply
      • Jean

        Perfect! Thank you.

  11. Hurri

    Hi Ania,
    It’s so simple but very effective, I love it!
    I have a suggestion for a tutorial snippet – how to make a tooltip (another module) appear on a button hover and positioned near or at the button.

    Reply
    • Ania Romańska

      Thank you, Hurri! I’ll see what I can do 😉

      Reply

Leave a Reply to Ernst Cancel reply

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

Enjoing our content?

You might find this interesting…

License Details

REGULAR LICENSE

Single Site

A regular license allows an item to be used in one project for either personal or commercial use by you or on behalf of a client. The item cannot be offered for resell either on its own or as a part of a project. Distribution of source files is not permitted.

EXTENDED LICENSE

Unlimited Sites

An extended license allows an item to be used in unlimited projects for either personal or commercial use. The item cannot be offered for resell either on its own or as a part of a project. Distribution of source files is not permitted.

SUPPORT & UPDATES

Each license is a one-time payment. There are no annual fees. You get lifetime access to product updates. Support is provided for 6 months from the date of purchase.

Server Requirements

SERVER SETTINGS:

  • PHP 7.2 or later
  • upload_max_filesize (256M)
  • max_input_time (300)
  • memory_limit (256M)
  • max_execution_time (300)
  • post_max_size (512M)

PHP.INI SETTINGS:

  • php-xml or/and php-dom
  • XMLReader
  • PHP CURL module

PHP MODULES:

  • allow_url_fopen

Would you like to...

Consult Ania and fellow students?

Join the conversation inside our private FB group.

Would you like to...

Get support privately?

Submit a support ticket via your account page.

Ask Ania?

Submit a question for the next live Q&A session.

Consult fellow students?

Join the conversation inside our private FB group.