[Resolved] Center Logo Navigation – Disable in Navigation Search

Home Forums Support [Resolved] Center Logo Navigation – Disable in Navigation Search

Home Forums Support Center Logo Navigation – Disable in Navigation Search

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #818625
    Douglas

    I’m using the CSS offered in the support documentation to center my logo in the primary navigation header (https://docs.generatepress.com/article/centering-logo-navigation/).

    However, when using the navigation search feature, the centered logo remains visible and clickable, even though the rest of the menu recedes. The logo does not have this problem when the centering CSS is not present. What is the best way to resolve this?

    #818920
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Any chance you can link us to your site so we can see the issue? You can edit your post to include your link privately.

    Let me know 🙂

    #820002
    Douglas

    Sorry about the delayed response; I had the dev site on a local environment, but I’ve moved it to an online staging site. I’ve added a URL to the original post.

    #820087
    David
    Staff
    Customer Support

    Hi there,

    you can edit this CSS you added:

    .site-branding,
    .site-logo {
    	position: absolute;
    	left: 50%;
    	-webkit-transform: translateX(-50%);
    	        transform: translateX(-50%);
    	z-index: 200;
    }

    And reduce the z-index to 15

    #820131
    Douglas

    Thank you!

    #820156
    David
    Staff
    Customer Support

    You’re welcome

    #820158
    Douglas

    One more question that has me stumped… I’ve been messing around with the CSS and can’t figure this out. I tried to increase the page width that triggers the mobile header up to 960px (in order to avoid a collision between the logo and the menu items). However I’m now in a situation where there are two navbars when the width falls anywhere between 768px and 960px, and I cannot figure out how to resolve this.

    #820184
    David
    Staff
    Customer Support

    Try this:

    @media (max-width: 960px) {
        #primary-menu {
            display: none;
        }
    }
    #820376
    Douglas

    I had tried that; the problem is that breaks the menu toggle between 768px-960px; now clicking on the mobile menu doesn’t do anything.

    Also it’s odd that the menu button is on the left side above 768px, and switches to the right side below 768px.

    #820692
    David
    Staff
    Customer Support

    Sorry my bad – try this CSS for adjusting the breakpoint:

    https://gist.github.com/generatepress/282078076cd8631c17717d5b8640c043

    #821339
    Douglas

    Works perfectly! Thanks again.

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