[Resolved] Mega Menu Width Setting When User Scrolls

Home Forums Support [Resolved] Mega Menu Width Setting When User Scrolls

Home Forums Support Mega Menu Width Setting When User Scrolls

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #318239
    TWMA Support

    Hi

    So just another fix I am looking for on the mega menu. I got the width looking great on the site pre-scroll but when the user scrolls the menu width becomes the full width of the screen and doesnt look great.

    I know it has something to do with the sticky menu changing width on scroll, but I cant see where in teh css to change this.

    The site is on my staging server and dont want to publicise the link so you can see whats happening. Do you have a mail address can send the link to along with screen shots?

    Thanks

    #318283
    Tom
    Lead Developer
    Lead Developer

    Sure, you can send it through this form: https://generatepress.com/contact/

    #318450
    Tom
    Lead Developer
    Lead Developer

    Try this CSS:

    @media (min-width: 769px) {
        .navigation-stick #primary-menu {
            float: right;
            position: relative;
        }
    }
    #318504
    TWMA Support

    Hi Tom

    Thats great thanks. Worked a treat.

    #318531
    Tom
    Lead Developer
    Lead Developer

    You’re welcome 🙂

    #2499338
    Waseem

    Hi Tom.

    I’m having a similar issue as above, and when I tried the code it gives me a narrow version of my mega menu. I’d like it to stay the same width as before I scroll.

    https://www.sourceonetechnology.com/

    Thanks

    #2499360
    Ying
    Staff
    Customer Support

    Try adding this CSS:

    .inside-navigation.grid-container {
        position: relative;
    }
    #2501402
    Waseem

    Ying when I tried that it didnt do anything and just made it narrow on scroll.

    However when I add this:

    @media (min-width: 1025px) {
        .inside-header {
            position: relative;
        }
    
        .inside-navigation.grid-container {
            position: static;
        }
    
        .navigation-stick .inside-navigation.grid-container {
            position: relative;
        }
    }

    It works. Thanks

    #2501411
    David
    Staff
    Customer Support

    Hi there,

    try clearing your browser caches, as on my browsers the width is the same when it is sticky.

    #2501415
    Waseem

    Yup, it works. Thanks

    #2501422
    David
    Staff
    Customer Support

    Glad to hear that !

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