[Resolved] Sticky navigation issues

Home Forums Support [Resolved] Sticky navigation issues

Home Forums Support Sticky navigation issues

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts
  • #929205
    Emma

    Hi, I’m having some issues with my sticky navigation. The main navigation has a small amount of padding to the left and right (I added this using the header padding settings), however the sticky navigation doesn’t, so when you scroll down, the sticky navigation is out of alignment. Is there any way to sort this? Is there a setting to add some padding to the sticky navigation so that the sticky nav is the same as the main nav?

    I also noticed there is a setting to ‘use navigation as header’, should I be using this option with the sticky navigation? If so, is there a way to add padding to it?

    Thanks.

    #929323
    David
    Staff
    Customer Support

    Hi there,

    try adding this CSS:

    #sticky-navigation .inside-navigation.grid-container {
        padding-left: 20px !important;
        padding-right: 20px !important;
    }
    #929338
    Emma

    Thanks but this doesn’t seem to solve it? There is still no padding added to the sticky navigation…

    #929718
    Leo
    Staff
    Customer Support

    The link you provided requires username and password.

    Any chance you can unlock it or provide the info through Account Issues?

    Thanks πŸ™‚

    #929719
    Emma

    Thanks, yes it’s still under construction. I have put it live so you should be able to view it now.

    #929745
    Leo
    Staff
    Customer Support

    I would say use the navigation as a header option is the way to go.

    Then set the inner width to contained:
    https://docs.generatepress.com/article/navigation-layout/#inner-navigation-width

    Then use this CSS:

    .inside-navigation.grid-container {
        max-width: 1800px;
    }

    Adding CSS: https://docs.generatepress.com/article/adding-css/

    Let me know πŸ™‚

    #929752
    Emma

    This doesn’t work either, the navigation and the sticky navigation are both the same doing it this way but I have lost the padding on the navigation. I also can’t see how to control the height of the main navigation when using the navigation as the header?

    #929759
    Leo
    Staff
    Customer Support

    Doesn’t look like you’ve set the inner navigation width to contained as suggested above?
    https://docs.generatepress.com/article/navigation-layout/#inner-navigation-width

    Then my CSS should work as adding the padding.

    The height is controlled by menu item height:
    https://docs.generatepress.com/article/menu-item-height-width/

    #929775
    Emma

    Nearly there… the menu is now fine but by changing the menu item height to get it to how it was before, it has also added big spaces between each menu item on the mobile menu.

    #929784
    Emma

    The padding on the main navigation is also causing some issues on my single posts which you can see if you look at one of the posts. I have a border on the bottom which doesn’t go right to the end now. Maybe it’s best if I forget about the sticky header, it’s not imperative to the site.

    #929788
    Leo
    Staff
    Customer Support

    You can also adjust the mobile menu item height by using the mobile toggle:
    https://docs.generatepress.com/article/menu-item-height-width/

    As for the single posts issue, are you referring to the shadow?

    If so replace:

    .inside-navigation {
        box-shadow: 0px 15px 10px -15px #ddd;
    }

    with

    #site-navigation {
        box-shadow: 0px 15px 10px -15px #ddd;
        position: relative;
    }
    #929797
    Emma

    Yes, I need the box shadow there because both the navigation background and the main background is white. It’s better but still not perfect, it still doesn’t quite go all the way across

    #929811
    Leo
    Staff
    Customer Support

    Try playing with the shadow number a bit.

    For example, this should make it full:

    #site-navigation {
        box-shadow: 0 5px 8px -1px rgba(0,0,0,.4);
        position: relative;
    }
    #929821
    Emma

    That’s great, thanks

    #929832
    Leo
    Staff
    Customer Support

    No problem πŸ™‚

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