Site logo

Archived topic

Sticky block

3 replies · Started by Greg on January 13, 2022

Viewing posts 1–4 of 4

Hi guys

Having some trouble getting a block to be sticky. I've added custom CSS for 'sticky-block', and assigned this class to the grid, but it's still not working for me.

Any ideas what I'm doing wrong?
(I've shared the URL in the info for this thread).

    .sticky-block {
        position: -webkit-sticky;
        position: sticky;
        top: 60px;
    }
    .sticky-block > .gb-inside-container {
    	height: 100%;
    }

Thanks for your time
Greg

Hi Greg,

Can you add a CSS class to the parent Container block of the Grid block, eg. sticky-parent-block, then add this CSS:

.gb-container.sticky-parent-block > .gb-inside-container {
    height: 100%;
}

Let me know if this helps :)

Hero! Thanks Ying, that's done the trick :)

You are welcome :)

This archived topic is closed to new replies.