Archived topic
Add Padding to Sub Menu
3 replies · Started by Mike on June 13, 2018
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
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/
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
Glad you found a solution :)