Site logo

Archived topic

Sticky sidebar for WP Forms on the right side

3 replies · Started by EJ on April 4, 2021

Viewing posts 1–4 of 4

Hey, I read the support forms for sticky sidebars for widgets, but none of them worked on my sidebar. The sidebar is a grid layout in my page. I wanted the right sidebar form to be sticky when a user scrolls up and down. Here is the url: staging2.brutecontracting.com/services/sewer-line-repair/

Hi there,

I assume what you've read is about right-sidebar being sticky?

If so, that won't work with your site because it's not using any sidebars.

Your "sidebar" isn't exactly the default theme sidebar, but a column made from GB Grid Block.

That said try this:

Add sticky-col to the Additional CSS class/es field of the Container block that serves as your sidebar within the Grid Block.

You then add this CSS:

.sticky-col .gb-inside-container {
    position: sticky;
    top: 60px;
}

Here's how it'll function: https://share.getcloudapp.com/2NuwAN88

Hey Elvin, it worked perfectly! Thank you so much

No problem. Glad to be of any help. :D

This archived topic is closed to new replies.