Skip to content(if available)orjump to list(if available)

A gentle introduction to anchor positioning

falcor84

As mentioned at the end of TFA, Codepip's Anchoreum is an excellent way of learning this.

[0] https://anchoreum.com/

xswhiskey

It being available on WebKit makes me hopeful for general adoption then.

rtkwe

I was expecting boat anchors haha.

efilife

Do we really need this? Why won't position: absolute and setting top/left/bottom/right suffice?

adamschwartz

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

Any day now, Firefox.

null

[deleted]

danielvaughn

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

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

Isnt there something like scroll-padding or scroll-margin? More or less an offset you can set so that doesn’t happen

RobRivera

Anchor post