[Resolved] Change padding only in sticky Menu

Home Forums Support [Resolved] Change padding only in sticky Menu

Home Forums Support Change padding only in sticky Menu

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1262717
    Katrin

    Hey,

    I added a CSS Padding to my menu in the desktop version.


    @media
    (min-width: 768px) {
    .main-navigation .inside-navigation {
    padding: 30px 30px 10px 30px;
    }
    }

    @media
    (max-width: 1024px) {
    .main-navigation .inside-navigation {
    padding: 5px 10px 5px 10px;
    }
    }

    The menu is sticky, but only appears when scrolling up. I want the menu to be small while scrolling up, so the padding shouldn’t apply for it. Can you provide me a Code which realize that?

    Thank you,
    Katrin

    #1262759
    David
    Staff
    Customer Support

    Hi there,

    try this CSS:

    @media (min-width: 768px) {
        .main-navigation:not(.is_stuck) .inside-navigation {
            padding: 30px 30px 10px 30px;
        }
    }
    
    @media (max-width: 1024px) {
        .main-navigation:not(.is_stuck) .inside-navigation {
            padding: 5px 10px 5px 10px;
        }
    }
    #1262768
    Katrin

    Great, that works! Thank you 🙂

    #1262773
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.