Sticky GB Sidebar Container

I’m currently using the following code to make the last widget sticky on scroll.

@media (min-width: 769px) {
.site-content {
	display: flex;
	}
	
.inside-right-sidebar {
	height: 100%;
	min-hight: 100%;
	}
	
.inside-right-sidebar aside:last-child {
	position: -webkit-sticky;
	position: sticky;
	top: 40px; /*Adjust position */
	}
}

What’s the code I need to make the last GB container for a GP Element sidebar? I’d like to migrate my widget sidebar to GP Elements as I plan to have a different sidebars but I can’t until I figure out how to make the last GB block sticky.

Thank you.

Rio

Hi Rio,

Can you share the link to the site in question?

HI Fernando.

I set this page with the Sidebar Element:

On this page, I’d like to get the bottom/last container sticky on scroll like the other pages.

All other pages are set up with the regular widgets. Notice their sticky widget.

Thanks for looking into this.

Rio

You can try this CSS:

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

div#right-sidebar .inside-right-sidebar > *:last-child  {
    position:sticky;
    top: 20px;
}

Yes! That works! Thank you very much.

You’re welcome @RioZavarce