Skip to content
All Answers
General

How do I enable smooth scrolling on Squarespace?

CSS smooth scrolling makes anchor link jumps and back-to-top buttons glide instead of snapping. It's a one-line addition to the html element that transforms the scrolling experience site-wide.

The scroll-behavior: smooth property works on all modern browsers. For users who prefer reduced motion (an accessibility setting), use the prefers-reduced-motion media query to disable it.

html {
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
/* Offset for fixed header */
:target {
  scroll-margin-top: 100px;
}
Generate this with our Back to Top toolTry it free →

Related Questions

General

How do I find the CSS selector for any element in Squarespace?

General

How do I change the background color of a specific section in Squarespace?

General

How do I hide a specific element by its ID in Squarespace?

General

How do I add a back-to-top button in Squarespace?

A little over your head?

No shame — this stuff is hard. Let the pros handle it.

Long Drive MarketingTalk to Long Drive Marketing →