CSS
February 24, 2016
What are the differences between relative, absolute, fixed, and static positioning?
- Static positioning is the default and it means that the element is positioned according to the normal flow of the page. Top, bottom, left, and right positioning do not affect static elements.
- Absolute positioned elements are oriented relative to the nearest parent element.
- Relative positioned elements are oriented relative their normal position.
- Fixed elements are positioned relative to the browser window. This means they remain stationary when scrolling.