[Resolved] Padding in primary menu

Home Forums Support [Resolved] Padding in primary menu

Home Forums Support Padding in primary menu

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #633849
    Pablo Rodríguez

    Hello, how I can define the padding (right and left) for the primary menu? The menu occupies the entire width of the container, and I would like it to align with the content

    GeneratePress 2.1.3
    GP Premium 1.6.2
    #633859
    David
    Staff
    Customer Support

    Hi there,

    You can add padding like so:

    .main-navigation ul {
    	padding-left: 10px;
    	padding-right: 10px;
    }

    This may cause longer menus to wrap to a new line on smaller screens though.

    #633879
    Pablo Rodríguez

    Ok, thank you, the question is that my menu has a blue background, and I would like that blue background to be reduced when I enter the padding. I mean, that margin would be white, like the background of the page

    #633898
    David
    Staff
    Customer Support

    OK this should help with the code above:

    .main-navigation:not(.mobile-header-navigation) {
    	background-color: #fff;
    }
    .main-navigation:not(.mobile-header-navigation) ul li {
    	background-color: #006fb9;
    }
    #633905
    Pablo Rodríguez

    Thanks, David, but doing so, the mobile menu also turns white.

    #633927
    David
    Staff
    Customer Support
    #633938
    Pablo Rodríguez

    Ok, perfect, David, now it’s perfect, I think 😉

    #633953
    David
    Staff
    Customer Support

    Haha here to help if needed 🙂

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