[Resolved] Add Padding to Sub Menu

Home Forums Support [Resolved] Add Padding to Sub Menu

Home Forums Support Add Padding to Sub Menu

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #599519
    Mike

    Hello,

    I am looking to add padding to the mobile menu dropdown. It seems at present like its too close to the top menu and search buttons.

    Thanks,
    Mike

    GeneratePress 2.1.2
    GP Premium 1.6.2
    #599588
    Leo
    Staff
    Customer Support

    Hi there,

    Instead of using your own CSS:

    .menu a {
        margin: 10px;
    }

    I’d recommend increasing the menu item height with mobile toggle on:
    https://docs.generatepress.com/article/menu-item-height-width/

    #599866
    Mike

    Hello,

    I ended up using the following CSS,

    
    #menu-main-menu > li:first-child{
        margin-top: 35px;
    }
    

    The reason I did not use the customizer layout option to increase the menu items height is because I still wanted the border line to be close underneath the text, so I used a margin as it then would not affect the border.

    I also ended up adding the following CSS to give the opened mobile sub menu some bottom padding so that its not so close to the menu item below it.

    
    .toggled-on{
        margin-bottom: 10px !important;
    }
    

    Really appreciate all the help!

    Thanks!
    Mike

    #600177
    Leo
    Staff
    Customer Support

    Glad you found a solution 🙂

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.