[Resolved] Different padding for menu elements of primary navigation?

Home Forums Support [Resolved] Different padding for menu elements of primary navigation?

Home Forums Support Different padding for menu elements of primary navigation?

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #288756
    Jose Antonio

    Hi!

    I want to established a padding for a few elements of my primary navigation, but other padding different for others.

    The problem is if I establish a “Left/Right spacing” in Appearence options for this menu, this is applied for all elements of the menú and, even if adding CSS class for this elements, that “left/right spacing” is still being applied.

    You can view that in http://www.agustingrau.com

    My intention is expand left/right spacing in the elements of the center in primary Navigation (“Libertad financiera”, “Sobre mi”, “blog”, etc.) but not in the social icons of the right.

    Thank you and regards!

    #288813
    Leo
    Staff
    Customer Support

    Hi Jose,

    We can use Custom Classes in the menu for that: https://docs.generatepress.com/article/using-the-wordpress-menu-builder/#custom-classes

    So for all the menu items that you want extra padding, add special-padding to the CSS Classes field, then add this CSS:

    .special-padding {
        padding-left: 50px;
        padding-right: 50px;
    }

    Let me know.

    #289264
    Jose Antonio

    Hi Leo,

    I’m stupid. Just that you comment me was that I was doing before write you. But I had an error syntax that I had not seen. ><

    Sorry for your lost time. Thank you.

    #289506
    Leo
    Staff
    Customer Support

    No worries. You’re welcome!

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