Jump to content

Disable smooth scrolling for anchor links

Recommended Posts

Site URL: https://www.lilymtang.com/blog/rae-lakes-loop

HTML anchor links by default will jump to a section on the page. For some reason, my anchor links have a smooth scrolling behavior. I don't think I ever added any code to make it that way, but I can't figure out how to get rid of it (is it default in the Brine template?). My pages are very long and the scroll effect is unwieldy and slow, so can someone help me figure out how to get back the default "jump to" behavior of anchor links? I have no code in my site code injection or blog code injection, and the only custom css I have are for width properties. I've tried adding the below into my custom css but it didn't work.

html {
scroll-behavior: auto !important;
}

 

Link to comment
  • Replies 2
  • Views 2k
  • Created
  • Last Reply
  • 2 weeks later...
On 2/13/2021 at 7:06 PM, tuanphan said:

Remove html {scroll-behavior: smooth;} code

Oh I'm sorry I actually meant I added scroll-behavior: auto. "smooth" is what people add to make it smooth scroll...I realize how ridiculous I must have sounded 🤦‍♀️  But what I have does NOT work, and explicitly adding the scroll behavior property also did not work.

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.