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:

  • float
  • left
  • bottom
  • z-index
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
BrowsersIEFirefoxSafariOperaChrome
Versionsfull 7, part 51160.2
Belongs to:

See the full list CSS properties and browser support: CSS Properties