Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Hamburger Menu Jumping on Scroll

  • When scrolling down the page, the hamburger menu which is on the left appears to be slightly moving from left to right. I don’t know where should I go to fix this?

  • 1. Remove this CSS:

     /* Style for the primary menu within the sticky navigation */
                    .main-navigation.navigation-stick #primary-menu {
                        position: relative;
                        /* Position relative to its normal position */
                        right: -28px;
                        /* Move it to the left */
                    }

    2. Change this CSS:

    .site-logo {
       position: absolute;
        z-index: 10000;
        left: 50%;
        transform: translateX(-50%);
    }

    TO:

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

    3. Add this CSS:

    span.menu-bar-item.slideout-toggle.hide-on-mobile.has-svg-icon a {
        padding-left: 0;
    }
    
    #sticky-navigation .menu-bar-items {
        justify-content: flex-end;
    }
    
    #sticky-navigation .inside-navigation.grid-container {
        max-width:1200px;
        display: flex;
        justify-content: space-between;
    }
    
    .main-navigation.navigation-stick #primary-menu {
        width: fit-content;
    }
    
  • Hi Ying,

    The layout is nearly perfect! However, when I scroll down to view the sticky navigation, I noticed that the hamburger menu is now on the right and the subscribe button on the left. They seem to have switched positions. I have shared the link to the staging site privately for you to review.

    Thank you for your assistance.

  • Hi there,

    in your CSS you have this rule:

    
    #site-navigation .inside-navigation, 
    #site-navigation .inside-navigation .menu-bar-items {
       flex-direction: row-reverse;
       gap: 10px;
    }
    

    Change it to:

    
    nav:is(#site-navigation, #sticky-navigation) .inside-navigation, 
    nav:is(#site-navigation, #sticky-navigation) .inside-navigation .menu-bar-items {
       flex-direction: row-reverse;
       gap: 10px;
    }
    
  • Thank you! Worked!

  • Glad to hear that

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