Site logo

Archived topic

Sticky sidebar not working with generateblocks

5 replies · Started by Marc on April 22, 2022

Viewing posts 1–6 of 6

I'm trying to "stick" a GenerateBlocks container element to my sidebar and it's not working. My css is:

@media(min-width: 769px) {
#right-sidebar .sticky-container {
position: -webkit-sticky;
position: sticky;
top: 0px; /* offset from top of screen on scroll */
}
}

I've given the generateblocks container a class of sticky-container.

Hi Marc,

In order to make the CSS work, you'll need to switch to flexbox from float at customizer > general.
Let me know if you need further assistance :)

Thanks. I made that change but still did not work. Do I need to set a 100% width to inside-right-sidebar?

I just checked your site, it's still using floatstructure.

I think there's some kind of cache needs to be cleared.

I cleared the cache. Still doesn't work. I did get it to work with 100% height to inside-right-sidebar. Is that the right way to do it?

Yes, it's now using flexbox.

And yes, set inside-right-sidebar's height to 100% is correct :)

This archived topic is closed to new replies.