Sets the type of position an element can have.
Static is an unpositioned element that goes with the normal document flow.
Relative is positioned relative to where in the flow it should be.
Absolute is positioned from the closest positioned container.
Fixed is fixed in position on the page, other content should scroll while it sits still. Fixed is not currently supported by IE.
- Live Example
- Play with the code in the textarea below.
- absolute, fixed, relative, static
- Default value
- Introduced in CSS version
- Applies to elements
- Browser Support
Browsers IE Firefox Safari Opera Chrome Versions full 7, part 5 1 1 6 0.2
See the full list CSS properties and browser support: CSS Properties