A gentle introduction to anchor positioning

42 feross 10 8/12/2025, 10:18:55 PM webkit.org ↗

Comments (10)

falcor84 · 1h ago
As mentioned at the end of TFA, Codepip's Anchoreum is an excellent way of learning this.

[0] https://anchoreum.com/

xswhiskey · 17m ago
It being available on WebKit makes me hopeful for general adoption then.
rtkwe · 52m ago
I was expecting boat anchors haha.
efilife · 2h ago
Do we really need this? Why won't position: absolute and setting top/left/bottom/right suffice?
adamschwartz · 1h ago
It solves many of the pain points Tether[0] tried to solve.

For example it helps when the anchoring element is inside of an oveflow hidden/scroll container, but geometrically you need the tethered element to sit/extend outside of the container (so—for now at least—its DOM node needs to be outside of the container).

[0] https://tetherjs.dev

pupppet · 2h ago
Any day now, Firefox.

No comments yet

danielvaughn · 3h ago
Anchor positioning sounds cool, but I ran into some very unintuitive behavior when I tried to use it. Can’t remember the details, it was a couple years ago.
bombcar · 2h ago
My problem is always been on sites that have a menu or something similar at the top. The anchor always inevitably goes to the very top of the screen gets covered by whatever menu it is.
chiefalchemist · 1h ago
Isnt there something like scroll-padding or scroll-margin? More or less an offset you can set so that doesn’t happen
RobRivera · 25m ago
Anchor post