Web design and digital-business ideas grounded in real tasks.

Scroll Anchoring Helps a Page Hold Its Place as Content Loads

A web design workstation showing a fictional article page with image placeholders and readable-looking but nonlegible type, hands absent, natural light.
AI-generated photographic illustration; not documentary photography.

You start reading halfway down an article, then an image loads above you. Without compensation, the paragraph can jump away even though you did not touch the scroll control. Scroll anchoring is a browser feature intended to reduce this kind of disruption.

MDN’s overview explains that the browser adjusts the scroll position in response to certain layout changes outside the viewport. The aim is to preserve the reader’s visible position, even though the numerical scroll offset may change.

It is not the same as reserving space

Giving images appropriate dimensions and planning space for delayed content helps prevent layout changes in the first place. Scroll anchoring addresses some of the effects when changes still occur. It should not become an excuse to inject unpredictable content into the reading flow.

Nor is an anchor here necessarily a link target beginning with a hash. The browser selects an element to help maintain position. The similarly named concepts solve different problems.

Use an opt-out carefully

The overflow-anchor property can exclude content from anchoring behaviour. It may help when a custom scrolling component conflicts with the browser’s adjustment, but disabling it across the whole page can remove a useful protection for readers.

Reproduce the problem before changing the property. Test delayed image loading, expanding content, keyboard navigation, and the actual browsers your audience uses. If application code also changes the scroll position, inspect that interaction rather than assuming the browser alone is at fault.

For a bug report, describe where the reader was, what loaded, and where the content moved. A short recording and a repeatable sequence are more useful than “scrolling feels strange.”

The desired result is straightforward: a person can keep reading while the page finishes loading. A good implementation combines stable layout with browser behaviour that supports that continuity, and uses exceptions only where the component actually needs them.