- Description
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.See also:
- Live Example
- Play with the code in the textarea below.
- Values
- absolute, fixed, relative, static
- Default value
- static
- Introduced in CSS version
- 2.1
- Applies to elements
- All
- Inherited
- No
- Browser Support
Browsers IE Firefox Safari Opera Chrome Versions full 7, part 5 1 1 6 0.2
Belongs to:
See the full list CSS properties and browser support: CSS Properties