Skip to content

Free Resource

Code Snippet Library

Free copy-paste CSS snippets for Squarespace. No plugins needed.

Why this matters

Custom CSS can transform a basic Squarespace site into something that looks completely custom — without hiring a developer. These ready-to-use code snippets handle the most common customizations people ask for: sticky headers, smooth animations, hover effects, and more. Just copy, paste, done.

17 snippets

Sticky Header on Scroll

7.0 + 7.1
Headers

Makes the site header stick to the top of the viewport after the user scrolls past the hero section.

Smooth Scroll to Sections

7.0 + 7.1
Navigation

Enables native smooth scrolling for anchor links so the page glides to each section instead of jumping.

Hide Header on Scroll Down

7.0 + 7.1
HeadersCSS + JS

Hides the header when scrolling down and reveals it when scrolling back up. Uses a tiny bit of JS.

Custom Hamburger Menu Animation

7.1
Navigation

Transforms the default hamburger icon into a smooth X animation when the mobile menu opens.

Fade In on Scroll

7.0 + 7.1
AnimationsCSS + JS

Elements fade in and slide up as they enter the viewport. Uses IntersectionObserver for performance.

Button Hover Slide Effect

7.0 + 7.1
Buttons

A sleek background color that slides in from the left on hover, giving buttons a modern interactive feel.

Button Pulse Animation

7.0 + 7.1
Buttons

Adds a subtle pulsing glow around CTA buttons to draw attention without being obnoxious.

Card Hover Lift

7.0 + 7.1
Animations

Gives summary/blog cards a lift effect with an enhanced shadow on hover for a tactile, interactive feel.

Gradient Text

7.0 + 7.1
Typography

Applies a vivid gradient color to heading text for a modern, eye-catching look.

Custom Scrollbar

7.0 + 7.1
Layout

Replaces the default browser scrollbar with a slim, styled track that matches your brand.

Image Zoom on Hover

7.0 + 7.1
Animations

Smoothly zooms into gallery and content images on hover while keeping the container clipped.

Responsive Text Clamp

7.0 + 7.1
Typography

Uses CSS clamp() for fluid typography that scales smoothly between mobile and desktop without breakpoints.

Remove Squarespace Badge

7.0 + 7.1
Layout

Hides the "Built on Squarespace" footer badge. Note: only available on Business plan and above.

Custom Selection Color

7.0 + 7.1
Typography

Changes the text highlight/selection color to match your brand when visitors select text on the page.

Announcement Bar Styles

7.1
Headers

Custom styles for the Squarespace announcement bar including gradient backgrounds, animations, and close button tweaks.

Custom Form Input Styling

7.0 + 7.1
Forms

Overhauls default Squarespace form inputs with modern rounded borders, focus states, and consistent spacing.

Back to Top Button

7.0 + 7.1
NavigationCSS + JS

Adds a floating button that appears on scroll and smoothly takes the user back to the top of the page.

Need custom Squarespace development?

These snippets are just the beginning. We build production-grade Squarespace sites with custom code, Dev Mode templates, and performance optimization.

Explore All Tools

A little over your head?

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

Long Drive MarketingTalk to Long Drive Marketing →