[Resolved] How to make navigation menu on center and button on navigation is on the right

Home Forums Support [Resolved] How to make navigation menu on center and button on navigation is on the right

Home Forums Support How to make navigation menu on center and button on navigation is on the right

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2276697
    Willya

    Hi,

    I want to make my navigation menu centered. While the “Hubungi Kami” button remains on the right.

    How to? I’ve tried to change the header alignment to be in the center but nothing changes at all.

    Please help 🙂

    #2276700
    Fernando
    Customer Support

    Hi Willya,

    Here’s a CSS you may try adding through Appearance > Customize > Additional CSS:

    @media (min-width: 1025px) {
        div#primary-menu {
            position: absolute;
            top: 50%;
            left: 50%;
            transform: translate(-50%,-50%);
        }
    
        header#masthead .inside-header {
            position: relative;
        }
    
        nav#site-navigation, nav#site-navigation .inside-navigation.grid-container {
            position: static;
        }
    }

    Take note though that at some point, at around 1040px, the menu wraps because it doesn’t fit the available space anymore. You could either add another CSS to make the menu font size smaller, or make this code only work up to 1040px.

    Hope this helps!

    #2276717
    Willya

    Once again, thank you Fernando for your help! The code you provided works!

    So, how to make that code only work up to 1040px?

    #2276721
    Fernando
    Customer Support

    You’re welcome Willya!

    You can replace 1025 with 1041 in the code.

    Hope this clarifies!

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