[Resolved] Sidebars Sticky – Left and Right

Home Forums Support Sidebars Sticky – Left and Right

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1427350
    Chitika

    Hello
    I have kept the layout as Sidebar/Content/Sidebar.
    I’m using GP Premium plugin.

    I placed Adsense codes on the left and right sidebars.
    I want to make them sticky without using a plugin.

    Is it possible.

    #1427529
    David
    Staff
    Customer Support

    Hi there,

    can you disable your cache plugin and remove any CSS you have added to make those elements sticky and i will take a look. However i am not sure it is possible.

    #1427631
    Chitika

    I have used the following code from one of your forum posts to make right- sidebar sticky.

    #right-sidebar {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
    }

    I have cleared all cache.
    But I’m unable to make the left-sidebar sticky.
    This is the forum post I’m talking.
    https://generatepress.com/forums/topic/sticky-sidebar-2/

    #1427801
    David
    Staff
    Customer Support

    Try this CSS:

    @media(min-width: 1024px) {
        .both-sidebars .site-content {
            display: flex;
        }
        .both-sidebars .site-content > div {
            left: unset !important;
        }
        
        #left-sidebar {
            order: -1;
        }
        
        .inside-left-sidebar, .inside-right-sidebar {
            position: -webkit-sticky;
            position: sticky;
            top: 60px;
        }
    }

    Please disable your Cache plugin and disable any other respsonsive scripts related to sticky ads.

    #1428557
    Chitika

    @David: Thanks, that worked perfectly. It saved me from another plugin. Great.

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