+ 2
Please can someone explain the difference between relative and absolute positioning in CSS?
CSS
2 Answers
+ 5
Relative positioning:Â The element creates its own coordinate axes, at a location offset from the viewport coordinate axis. It is Part of document flow but shifted.
Absolute positioning:Â An element searches for the nearest available coordinate axes among its parent elements. The element is then positioned by specifying offsets from this coordinate axis. It removed from document normal flow.