[Resolved] Centered logo with menu (left) and search icon (right)

Home Forums Support [Resolved] Centered logo with menu (left) and search icon (right)

Home Forums Support Centered logo with menu (left) and search icon (right)

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1401238
    Immi

    I’m using Navigation as Header, I want to keep the logo in the center menu (left) and search icon (right).

    Thanks

    #1401350
    Leo
    Staff
    Customer Support

    Hi there,

    It’s a bit difficult with the navigation search inside the menu set up we currently have unfortunately.

    Give this CSS a shot:

    @media (min-width: 769px) {
        li.search-item {
            position: absolute;
            right: 0;
        }
        .main-navigation:not(.slideout-navigation) .main-nav {
            order: 1;
        }
        .navigation-branding {
            position: absolute;
            top: 0;
            left: 50%;
            transform: translateX(-50%);
        }
    }
    #1401413
    Immi

    Hi,
    unfortunately, it’s not working

    #1401431
    Leo
    Staff
    Customer Support

    What is not working?

    I’m not seeing the code added?

    #1401924
    Immi

    The code you provided below is working fine.

    Thank You.

    https://docs.generatepress.com/article/centering-logo-mobile-header/#mobile-header .site-logo {
    position: absolute;
    left: calc( 50% – 90px); /* 50% from the left – half your image width */
    }

    #mobile-header button.menu-toggle {
    position: absolute;
    left: 0;
    }

    #1402863
    Leo
    Staff
    Customer Support

    Glad to hear 🙂

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