Comments on: How to make a divi sticky section on scroll https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/ Boost the power of your Divi website Fri, 17 Nov 2023 12:29:15 +0000 hourly 1 https://wordpress.org/?v=6.5.4 By: Morten https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-196735 Mon, 30 May 2022 01:56:31 +0000 https://diviengine.com/?p=61176#comment-196735 In reply to Divi Engine.

Actually this will not work as it is exactly the same code as when we want it to stick.

This is what worked for me:

@media (max-width: 981px) {
.sticky-section {
position: static;
position: -webkit-static;
}
}

The media query should be max-width, not min-width. And the position value should be static, not sticky (as it is already is sticky on larger screens).

Also, remember to add the sticky-section class to the column, not the module itself.

]]>
By: Dave https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-171091 Sun, 06 Jun 2021 18:49:17 +0000 https://diviengine.com/?p=61176#comment-171091 This is exactly what I needed so thank you! The only issue I’m running into is if I add “sticky-section” to the right side column it only scrolls until the end of that row. How would I make it so the right column is sticky until the end of the section?

http://staging-keukalakesideinn.kinsta.cloud/accomodations/single-queen-bed/

Thanks in advance,
Dave

]]>
By: Mike https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-154767 Wed, 11 Nov 2020 14:53:43 +0000 https://diviengine.com/?p=61176#comment-154767 In reply to Divi Engine.

Awesome, thanks!

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-154720 Wed, 11 Nov 2020 10:59:33 +0000 https://diviengine.com/?p=61176#comment-154720 In reply to Michael Stott.

Found the problem. You need to add position: initial to the body of the site – try this.

I have updated the code above

FYI –
body {
display: initial;
}

]]>
By: Michael Stott https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-154629 Tue, 10 Nov 2020 16:39:26 +0000 https://diviengine.com/?p=61176#comment-154629 Hi Pete,

Has something changed in the function of this? I have two of these on a site which I found are no longer working (they were working yesterday), so I came here to see if your demo was working and it isn’t, even in incognito and on mobile device. Any ideas?

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-152995 Mon, 26 Oct 2020 08:05:47 +0000 https://diviengine.com/?p=61176#comment-152995 In reply to Rogier The.

See below, change 981, to be the number you want when you want it to stop

@media (min-width: 981px) {
.sticky-section {
position: sticky;
position: -webkit-sticky;
top: 80px; /* Change the height from the top here */
}
}

]]>
By: Rogier The https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-152994 Mon, 26 Oct 2020 07:34:05 +0000 https://diviengine.com/?p=61176#comment-152994 Hey there, would you be so kind to provide a custom ccs to deactive the effect on mobile?

Thank you!

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-151892 Fri, 16 Oct 2020 08:01:37 +0000 https://diviengine.com/?p=61176#comment-151892 In reply to Thunderbits.

Not sure what you mean by two fixed sections? Can you send me a link to your website where you want it to be sticky so I can see?

]]>
By: Thunderbits https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-151827 Thu, 15 Oct 2020 11:35:52 +0000 https://diviengine.com/?p=61176#comment-151827 I tried to make that “Fixed Section” Element working in Divi-page, so that it stays sticky until the bottom of a section reaches the top of the window – but I can’t get it to work at all.
Would you be so kind to explain, what you have done, to make that two “Fixed Section”-Elements stay sticky and then scroll away like on this page?
Thanks in Advance…

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-147775 Thu, 03 Sep 2020 12:19:35 +0000 https://diviengine.com/?p=61176#comment-147775 In reply to Jen.

I think you will need to have a column layout where the sticky module is on the side whereas the rest of the modules are on the other. Put it all in the same section, then it should work well.

]]>
By: Jen https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-147738 Thu, 03 Sep 2020 02:24:37 +0000 https://diviengine.com/?p=61176#comment-147738 Does this CSS class work on individual modules? I see that it worked on my rows, but I only want one side module to sticky while the rest of the page scrolls. thanks.

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-145092 Mon, 03 Aug 2020 08:04:13 +0000 https://diviengine.com/?p=61176#comment-145092 In reply to Alyssa.

Hi. I tried to go to your test URL, but nothing shows

]]>
By: Alyssa https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-145078 Sun, 02 Aug 2020 23:29:14 +0000 https://diviengine.com/?p=61176#comment-145078 Hi there, I’m trying to make the words “You shouldn’t have to choose.” on the left column be sticky as I scroll the right column. Here’s my test page: https://theclevernod.com/test-sticky/

Any advice?

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-143336 Thu, 16 Jul 2020 07:33:10 +0000 https://diviengine.com/?p=61176#comment-143336 In reply to Denise.

What are you trying to stick? Can you send me a link to the page so I can check?

]]>
By: Denise https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-143302 Wed, 15 Jul 2020 21:01:46 +0000 https://diviengine.com/?p=61176#comment-143302 Sorry, this doesn’t work for me (yet). I added the CSS code to my child theme via Appearance > Customize > Additional CSS. Could it have something to do with the fact that my menu bar on the top of the page is fixed?

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-140100 Mon, 29 Jun 2020 12:13:07 +0000 https://diviengine.com/?p=61176#comment-140100 In reply to Michael.

Perfect, thanks!

]]>
By: Michael https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-140099 Mon, 29 Jun 2020 12:06:32 +0000 https://diviengine.com/?p=61176#comment-140099 In reply to Divi Engine.

Yes, its due the the Speciality section. I just changed the column to regular and now its working. Thanks!

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-140091 Mon, 29 Jun 2020 11:41:07 +0000 https://diviengine.com/?p=61176#comment-140091 In reply to Michael.

Not sure on your set up but it needs to have the same heights to work properly. Equalise the heights of the two columns and it will work.

]]>
By: Michael https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-140090 Mon, 29 Jun 2020 11:36:09 +0000 https://diviengine.com/?p=61176#comment-140090 In reply to Divi Engine.

This didnt work, would this have anything to do with the fact we’re using a speciality section (it’s the first one, second row in the options)?

I can only equalize the column height where the blog posts are, the sidebar is just a sidebar module.

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-140088 Mon, 29 Jun 2020 10:56:27 +0000 https://diviengine.com/?p=61176#comment-140088 In reply to Mike.

Can you please try make your columns equal heights using the Divi Builder. In the row, Design tab – enable “equalize column heights”

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-140078 Mon, 29 Jun 2020 08:03:11 +0000 https://diviengine.com/?p=61176#comment-140078 In reply to Santosh.

No – you add the CSS in Divi > Theme Options > Custom CSS

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-140077 Mon, 29 Jun 2020 08:02:29 +0000 https://diviengine.com/?p=61176#comment-140077 In reply to Mike.

That is interesting – do you have an example URL of when you have it with there is no content below?

]]>
By: Mike https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-140043 Sun, 28 Jun 2020 15:11:27 +0000 https://diviengine.com/?p=61176#comment-140043 This is great! I have a sidebar on my blog which i want to fix to the screen when scrolling but unfortunately the code doesnt seem to work unless theres content/module directly below the section I want to stick.

I have a special section (where the side bar is) and then a normal section below it, and it wont work. If I put a dummy module below the sidebar it sticks.

Am I missing something?

Thanks

]]>
By: Santosh https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-139967 Sat, 27 Jun 2020 10:34:10 +0000 https://diviengine.com/?p=61176#comment-139967 Hey, Peter, Sorry man. This hasn’t worked too well for me. Do I need to go to Section Settings >> Custom CSS >> Main Element and paste this code?

.sticky-section {
(error1->[Expected RBRACE])
position: sticky;
position: -webkit-sticky;
(error2->[Expected static|relative|absolute])
top: 80px; /* Change the height from the top here */
}

#page-container {
overflow: visible !important;
}

]]>
By: Marc NOZAY JEHANNIN https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-139227 Wed, 17 Jun 2020 13:06:30 +0000 https://diviengine.com/?p=61176#comment-139227 Super 😀

]]>
By: Divi Engine https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-135751 Mon, 11 May 2020 11:39:51 +0000 https://diviengine.com/?p=61176#comment-135751 In reply to Krishnam Raju.

Pleasure my friend! Have a great week

]]>
By: Krishnam Raju https://diviengine.com/how-to-make-a-divi-sticky-section-on-scroll/#comment-135750 Mon, 11 May 2020 11:32:46 +0000 https://diviengine.com/?p=61176#comment-135750 Just awesome and simple! Thank Peter.

]]>