Archived topic
Primary menu padding
7 replies · Started by ammgbr on September 17, 2021
Hello,
I have my logo and sticky primary navigation menu on the same line - I have green colour on hover for menu items.
How can i reduce the top/bottom padding of the menu items so that the green highlighted area on hover is more slim?
Also, how can I adjust the size of the off canvas menu logo? - I have selected this menu to display on mobile only.
Hi there,
Try this CSS for the menu item padding question:
@media (min-width: 769px) {
.main-navigation .main-nav ul li a {
line-height: 50px;
}
}
Adding CSS: https://docs.generatepress.com/article/adding-css/
And please open a new topic for the second question so we can handle one question per topic.
Thanks!
Thank you - that worked for desktop / tablet version but not for mobile
Hi there,
For mobile, you can reduce the menu item height at customizer > layout > off canvas panel:
https://docs.generatepress.com/article/off-canvas-panel-overview/#menu-item-height
thanks - i notice the new css i added makes the dropdown icons of the off canvas menu on the mobile version not to align on the right as previously.
It's not the CSS Leo provided, it's this CSS:
https://www.screencast.com/t/d5k8tOAY3LZ
.main-navigation li a:after {
opacity: 0;
transition: opacity 500ms ease-in-out;
content: "";
}
May I ask why this CSS is needed? It doesn't seem doing anything but breaking the position of the arrow.
Let me know :)
Removed it - that sorted it , many thanks!
You are welcome :)