Site logo

Archived topic

How to let the content sticky on the side bar

6 replies · Started by Paul on July 1, 2022

Viewing posts 1–7 of 7

HI
PLS CHECK THE SCREENSHOT https://prnt.sc/7AY_-pxeDa_f

Maybe we can let the any content sticky on sidebard, so can we achieve it with generatepress theme tools?

hi,

check this link and u can find the content on side bar on any page

You’ll need custom CSS to achieve that.

Adding this CSS in Appearance > Customize > Additional CSS should make the last widget in your sidebar sticky:

.inside-right-sidebar {
    height: 100%;
}

.inside-right-sidebar > .widget:last-of-type {
    position: sticky;
    top: 80px;
}

I don’t think having 2 widgets sticky will fit the viewport.

Hope this helps!

thanks

this is only useful for desktop?

Hi there,

yes it will only work on desktop ( larger screen devices ).

Add the CSS within a media query like so:

@media(min-width: 769px) {
    .inside-right-sidebar {
        height: 100%;
    }

    .inside-right-sidebar>.widget:last-of-type {
        position: sticky;
        top: 80px;
    }
}
This archived topic is closed to new replies.