Site logo

[Resolved] Sticky container from the sidebar

Home Forums Support [Resolved] Sticky container from the sidebar

Home Forums Support Sticky container from the sidebar

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #2484032
    Christian

    Hello,

    I want to make a container of a sidebar sticky. I have found the following code that David provided in another topic but it doesn’t work for me. I added make_sticky to the container in the sidebar element and the CSS code in the Customizer > Additional CSS.

    @media(min-width: 769px) {
        .inside-right-sidebar {
            height: 100%;
        }
        .make_sticky {
            position: -webkit-sticky;
            position: sticky;
            top: 60px;
        }
    }

    Best regards
    Christian

    #2484061
    Fernando
    Customer Support

    Hi Christian,

    You need to make the parent Container Block full height as well. Try replacing the code you have with this:

    @media(min-width: 769px) {
        .inside-right-sidebar, .inside-right-sidebar > .gb-container, .inside-right-sidebar > .gb-container > .gb-inside-container {
            height: 100%;
        }
        
        .make_sticky {
            position: -webkit-sticky;
            position: sticky;
            top: 60px;
        }
    
    }
    #2484257
    Christian

    Hello Fernando,

    unfortunately the container is still not sticky with this code.

    #2484265
    Fernando
    Customer Support

    Sorry, there was a missing . in my code. I updated it now. Can you try the new code above?

    #2484435
    Christian

    Thanks, it’s working now!

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