1. PROMO Get 60% OFF Lifetime Pro Membership & access all our Pro Divi Extensions, Divi Layouts, Divi AI Generator, Divi Block, etc.VIEW PRICING
Dismiss Notice
UPDATE Custom Color Scheme + Premade Divi Layouts - A perfect combination to boost productivity. New 'Gadget Repair' layout added.Try our Custom Color Layouts
BEST Divi Block - A revolutionary online drag & drop tool to easily mix & match 478+ premade blocks to kick start your Divi site design. Special module designs are included as well.
Learn MoreTry Free Version

Solved Collapse submenu items in the mobile menu

Discussion in 'Free Divi Community Forum' started by Jointly, Nov 1, 2019.

  1. Luciano

    Luciano New Member

    I solved it, it was simply the fault of a conflicting plugin
     
    1. PRO MEMBER PERKS Beautifully crafted custom colored 'Industrial' Divi layout for all Pro members:View Demo
  2. Lizz

    Lizz New Member

    Hi there!
    Thanks for providing this code! It worked beautifully.
    But since a few updates I have unfortunately the problem that I can no longer scroll within the dropdown. The web page under the menu scrolls. The menu remains standing.
    The header is built with the Divi Theme Builder and we use Divi version: 4.19.2 and Wordpress version: 6.1.1.
    Thanks in advance
     
  3. Divi.Help

    Divi.Help Administrator
    Staff Member

    Kindly share your URL.
     
    1. PRO MEMBER PERKS Divi Block Pro - Premade horizontal timeline design for your Divi site without using any plugins:View Demo
  4. Lizz

    Lizz New Member

    For example it's https://thales-datenschutz.de/ .. but there are some more websites with the same problem.
     
  5. Divi.Help

    Divi.Help Administrator
    Staff Member

    Try the below CSS:
    Code:
    .et_mobile_menu {
        max-height: 80vh;
        overflow: auto;
    }
     
    1. PRO MEMBER PERKS Divi Block Pro - Powerful Divi header builder for you to mix & match premade header design, mobile menu & more:Learn More
  6. Lizz

    Lizz New Member

    Awesome! Thank you :)
     
  7. Knightfal

    Knightfal New Member

    Hi

    I have used the code and it works. I have one small issue.

    On the front page the dropdown menu works great.
    On my sub pages on mobile it shows full expanded, not collapsed as on the front page.

    Any suggestion?

    Working:
    working.jpg

    Issue:
    issue.jpg

     
    1. PRO MEMBER PERKS Divi Block Pro - Premade gradient text design for your Divi site without using any plugins:View Demo
  8. Divi.Help

    Divi.Help Administrator
    Staff Member

    Try the below CSS in Divi > Theme Options > Custom CSS:
    Code:
    .et-db #page-container #et-boc header .et_mobile_menu ul.sub-menu {
        display: none !important;
        visibility: hidden !important;
        transition: all 1.5s ease-in-out;
    }
    .et-db #page-container #et-boc header .et_mobile_menu .visible > ul.sub-menu {
        display: block !important;
        visibility: visible !important;
    }
     
  9. Knightfal

    Knightfal New Member

    Awesome, that worked.
    Only issue now is that on the main page is shows L instead of a + to expand the menu on the frontpage.
    Sub pages works.

     
    1. PRO MEMBER PERKS Divi Block Pro - Premade before / after image slider for your Divi site without using any plugins:View Demo
  10. Divi.Help

    Divi.Help Administrator
    Staff Member

    Try to disable Dynamic Icon at WP Admin > Divi > Theme Options > General > Performance & see if it works.
     
  11. Knightfal

    Knightfal New Member

    That worked. Thanks

     
    1. PRO MEMBER PERKS Divi Ultimate Archive Plugin - Replace the default archive "Older Entries" with beautiful pagination:Learn More