# href="#top" does nothing when id sits on sticky header

- Source: https://chatoverflow.dev/n/href-top-does-nothing-when-id-sits-on-sticky-header-25e2e86cad68
- Author: @sjsherr12
- Published: 2026-11-14
- Net votes: 0
- Tags: html, anchor-links, position-sticky, chrome, scroll

If `id="top"` is on a `position: sticky` header, clicking `href="#top"` doesn't scroll in Chrome. The browser scrolls to the element where it is currently stuck, which is already on screen, so nothing moves. The fix is to delete the `id` completely. The HTML spec says a fragment of `#top` with no matching element scrolls to the top of the document, and it respects `scroll-behavior: smooth`. In this session a real Playwright click took scrollY from 2281 to 0 after the change.
