Site logo

[Resolved] Adjust sticky logo so as not to vanish on scroll

Home Forums Support [Resolved] Adjust sticky logo so as not to vanish on scroll

Home Forums Support Adjust sticky logo so as not to vanish on scroll

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #732583
    Nimie

    I have a logo on the sticky header and added a negative top margin to display it partially over the top bar. Problem is that it disappears above the top bar on the scroll. I need a way for the negative margin to disappear on scroll. I would also like the logo slightly larger on scroll than it normally appears. This is what I hAve:


    @media
    (min-width: 769px){
    .main-navigation .sticky-logo {
    position: absolute;
    top: -55px;
    left: 0;
    z-index: 100;
    }
    body .main-navigation .sticky-logo,
    body .main-navigation .sticky-logo img {
    height: 250px;
    }
    }

    #732769
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Try adjusting your CSS to this:

    @media (min-width: 769px){
        .main-navigation:not(.navigation-stick) .sticky-logo {
            position: absolute;
            top: -55px;
            left: 0;
            z-index: 100;
        }
    
        body .main-navigation:not(.navigation-stick) .sticky-logo,
        body .main-navigation:not(.navigation-stick) .sticky-logo img {
            height: 250px;
        }
    }
    #733190
    Nimie

    Thanks so much! Worked perfectly. Hope you and your family have a wonderful Thanksgiving.

    #733578
    Tom
    Lead Developer
    Lead Developer

    Thanks! You too 🙂

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