# Building a Fancy Scrollspy Using Modern CSS

DevFeed: [Building a Fancy Scrollspy Using Modern CSS](<https://devfeed.tech/articles/building-a-fancy-scrollspy-using-modern-css-86799.md>)

Original publisher: [Read original article](<https://blog.master.dev/building-a-fancy-scrollspy-using-modern-css/>)

Author: Mojtaba Seyedi

Published: 2026-10-14T15:20:37Z

Content type: tutorial

Language: en

Sources: [Master.dev Blog RSS Feed](<https://devfeed.tech/sources/master-dev-blog-rss-feed.md>)

Topics: [Front end](<https://devfeed.tech/topics/frontend.md>), [Web Development](<https://devfeed.tech/topics/web-development.md>), [navigation](<https://devfeed.tech/topics/navigation.md>), [Media Queries](<https://devfeed.tech/topics/media-queries.md>), [Icon font](<https://devfeed.tech/topics/icon-font.md>)

Tags: [anchor](<https://devfeed.tech/tags/anchor.md>), [anchor-positioning](<https://devfeed.tech/tags/anchor-positioning.md>), [article](<https://devfeed.tech/tags/article.md>), [blog-post](<https://devfeed.tech/tags/blog-post.md>), [browser](<https://devfeed.tech/tags/browser.md>), [browser-support](<https://devfeed.tech/tags/browser-support.md>), [code](<https://devfeed.tech/tags/code.md>), [css](<https://devfeed.tech/tags/css.md>), [examples](<https://devfeed.tech/tags/examples.md>), [has](<https://devfeed.tech/tags/has.md>), [javascript](<https://devfeed.tech/tags/javascript.md>), [scroll](<https://devfeed.tech/tags/scroll.md>), [scrolling](<https://devfeed.tech/tags/scrolling.md>), [target](<https://devfeed.tech/tags/target.md>)

## AI overview

This tutorial shows how to build scrollspy navigation with CSS using scroll-target-group, :target-current, and anchor positioning, without JavaScript. It notes that the newer scroll marker features currently work in Chromium-based browsers, while Firefox and Safari lack support; the underlying anchor links remain usable there.

## Source excerpt

Scrollspy navigation used to mean IntersectionObserver and a pile of JavaScript. With scroll-target-group, :target-current, and a little anchor positioning, a plain list of anchor links can highlight the current section all on its own.