[Resolved] How to Make the last widget on sidebar sticky or scrolls down with the page?

Home Forums Support [Resolved] How to Make the last widget on sidebar sticky or scrolls down with the page?

Home Forums Support How to Make the last widget on sidebar sticky or scrolls down with the page?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1442236
    Peter Paul

    Hi GP Team,

    I recently added an ad banner on my side bar.
    Currently there are 5 elements on the side bar.
    The 300×600 ad banner is the last element, and this ad only appears on posts and pages.
    How can I make that ad banner sticky or the last widget sticky, or scrolls down together with the page?
    This way the ad banner remains visible even if the user scrolls down to the bottom of the post/page.
    Kindly let me know.

    Thanks,

    #1442264
    David
    Staff
    Customer Support

    Hi there,

    can you provide a link to your site so i can take a look at what CSS is required.

    #1442295
    Peter Paul

    Link on “private information”
    Note: the sidebar ad will only appear on posts / articles. It’s hidden on front page.
    Thanks!

    #1442310
    David
    Staff
    Customer Support

    try this CSS:

    @media(min-width: 1024px) {
        .site-content {
            display: flex;
        }
    
        .inside-right-sidebar {
            height: 100%;
        }
    
        .inside-right-sidebar .widget:last-of-type {
            position: sticky;
            position: -webkit-sticky;
            top: 60px;
        }
    }
    #1442321
    Peter Paul

    It worked! 🙂
    Thank you very much! (b^_^)b

    #1442347
    David
    Staff
    Customer Support

    You’re welcome

    #1683556
    The High on Marketing

    Hii David, Please take a look at my website. I want to make the sidebar sticky too on all of my posts.
    https://thehighonmarketing.com

    #1683605
    Leo
    Staff
    Customer Support

    Do you only want the last widget in the right sidebar sticky as well?

    If you want something different, please open a new topic.

    Thanks!

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