Streaming live at 10am (PST)

Center section on smooth scroll

Hi guys!

I’m trying to center each section in the middle of the screen when user scroll through the page.
I did read the topic: and did add a new custom attribute called data-scroll and set its value to mid for each section. But it doesn’t help.

Here is my site Read-Only:

Any suggestions?
Thank you.

Did you add an ID to each element that you’re targeting?

1 Like

I didn’t but after reading your reply, I’ave add ID to each section.
However, it didn’t work neither.

Anythings else that I should try?

@thangbe I think I’m trying to do the same thing and the difference with the other thread’s reference is that it demonstrates how to align the smooth scroll target to centered on the element but what we want to do is make the smooth scroll activate on mouse scroll rather than a clicked anchor. Kinda like this, right?

1 Like

Yes good question @effixx@thangbe is the: what youre trying to accomplish?

1 Like

Yes, it is.

@callmevlad since you are an expert on this scroll issue, could you take a look at the website and give us some advise?

Thank you a lot!

Hi @thangbe I like that site effect too… Currently the only way to “auto scroll to a section” is with a click trigger… To use a scroll trigger you will need a bit of custom code. There have been discussions on this:

Now these are slightly old discussions but they can still be deployed with a little snippet insertion.


Hi @garymichael1313

I sincerely appreciate you taking the time to look up the forum and send me the discussions. Thank you so much.

Absolutely will try these and I’ll let you know if it works with me.

Good day!

1 Like

@thangbe … no problem have a great weekend!

I think the data-scroll=midthing doesn’t work anymore.

I had it working on this demo I’m sure (link to green section)

@vincent … I don’t think on the body does either… I tried it a number of ways to no avail.

But for what you look to do, you can place dummy elements (empty absolute divs) as targets.

The data-scroll-time on the body. That doesn’t work anymore I don’t think.

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.