Problem Statement
When would you use absolute vs fixed positioning?
Explanation
Use absolute for elements that need to align relative to a container (like tooltips or badges). Use fixed when you want an element to stay visible during scroll, like sticky headers or chat widgets.
Code Solution
SolutionRead Only
.tooltip { position: absolute; top: 100%; left: 0; } .navbar { position: fixed; top: 0; }Practice Sets
This question appears in the following practice sets:
