HTML & CSS · Senior · Question 32 of 75

What is CSS Anchor Positioning used for?

Explanation

An anchor is declared with anchor-name: --btn, and the positioned element references it via position-anchor and the anchor() function (or position-area). Fallbacks exist for lack of space (position-try-fallbacks). This used to require libraries like Floating UI. Browser support isn't complete everywhere yet - check it before use.

Further reading

Problem with a question

HTML & CSS · Senior · question 32

Test yourself

Take the HTML & CSS · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz