[Support request] Sticky navigation padding

Home Forums Support [Support request] Sticky navigation padding

Home Forums Support Sticky navigation padding

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #746343
    Michael

    Hi,

    I have a full width navigation on this site that has left and right header padding of 40px.

    When sticky on desktop is used that padding is removed when the sticky is activated scrolling down the page.

    Which class or id do i target to add the 40px padding back in for the sticky nav?

    thanks,

    #746360
    Leo
    Staff
    Customer Support

    Hi there,

    This method might works best:
    https://docs.generatepress.com/article/navigation-as-a-header/

    Let me know if this helps 🙂

    #746377
    Michael

    Hi Leo, I looked at that method but for a few reasons didn’t go with it.

    After a bit more testing I found this code does what I want.

    @media (min-width: 769px) {
        .main-navigation.sticky-navigation-transition .navigation-logo img {
            padding-left: 40px;
        }
        .nav-float-right .is_stuck.main-navigation ul {
            padding-right: 40px;
        }
    }

    Is there anything wrong with using this way?

    #746402
    Leo
    Staff
    Customer Support

    Hmm looks good I think.

    I think this should also work:

    @media (min-width: 769px) {
        .main-navigation.navigation-stick .inside-navigation {
            padding: 0 40px;
        }
    }
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.