Site logo

Archived topic

Placing space in between Primary menu navigation buttons (desktop)

5 replies · Started by Cynthia on March 11, 2021

Viewing posts 1–6 of 6

I would like add margin (space) in between the navigation items on the primary menu (desktop view).

I can't figure which element to custom code.

URL is in private area

Hi there,

I believe you don't need custom CSS to achieve this.

Go to Appearance > Customize > Layout > Primary Navigation and increase the "Menu Item width" value so the menu items look further away from each other.

Elvin - please look at my example attached to see what i meant. I would like spacing in between each menu item only on Primary nav.

Try this CSS:

@media (min-width: 769px) {
    .main-navigation {
        background-color: transparent;
    }
    .main-navigation .main-nav ul li a {
        background-color: #1e3c72;
    }
    .main-navigation .main-nav > ul > li:not(:last-child) {
        margin-right: 15px;
    }
}

Adding CSS: https://docs.generatepress.com/article/adding-css/

Thanks Leo - it worked!

No problem :)

This archived topic is closed to new replies.