scroll-behavior: smooth;
-
Hi
i'm working on this site http://nytforumforskrift.dk/forside. I'm using for my anchor linkshtml { scroll-behavior: smooth; }
seems like this code is interfering with the how the intergrated "scroll to top" works? when using scroll-behavior: smooth; "scroll to top" does not work very smooth. Is there a work around this?
Best,
Hans -
Dear Hans
@Hans-Pelle
As a first step, is there anything in these threads that helps?
http://laythemeforum.com:4567/topic/5975/anchor-scroll-dekstop-mobile/12
http://laythemeforum.com:4567/topic/6446/scroll-on-iframe-vimeo/2
If not we can take it from there 🌝
Best wishes
Richard
-
Hi Richard
Thank you for your answer :-)
When adding the JS from the post you linked to then "scroll to top" stops working...
Would it help to disable the code used for the "scroll to top" and then only use html {scroll-behavior: smooth;} ?
Best,
Hans -
I just updated laytheme, now everything works. Som maybe a bug from older version of laytheme.
Best
Hans -
Thanks for the update @Hans-Pelle have a wonderful Christmas! 🎄
-
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it