Problem Statement
Explain different types of CSS positioning.
Explanation
CSS has five main position values: static, relative, absolute, fixed, and sticky. Static is default and doesn’t move. Relative moves an element based on its normal position. Absolute positions relative to the nearest positioned ancestor. Fixed stays in place during scroll. Sticky combines relative and fixed behaviors depending on scroll offset.
Code Solution
SolutionRead Only
div { position: absolute; top: 0; }