Direct link to the article Fixed Headers, On-Page Links, and Overlapping Content, Oh My!

Fixed Headers, On-Page Links, and Overlapping Content, Oh My!

Let’s take a basic on-page link:

<a href="#section-two"Section Two</a

When clicked, the browser will scroll itself to the element with that ID: <a href="#section-two">Section Two</a>. A browser feature as old as browsers themselves, just about.

But as soon …

Avatar of Chris Coyier
Chris Coyier on (Updated on )

Introducing CSS Scroll Snap Points

Before this new CSS I’m about to introduce existed, locking an element into the viewport on scroll required rigging up some JavaScript. As you may know, JavaScript has a well-earned reputation to be tricky when paired with scrolling behavior.

The …

Avatar of Sarah Drasner
Sarah Drasner on (Updated on )