/

HTML / CSS / JavaScript Tutorial

CSS Property: position

[this page | pdf | back links]

The CSS (CSS2) position property indicates how an element should be positioned.

 

Valid property values (other than inherit and initial) are:

 

Value

Description

absolute

The element is positioned relative to its first positioned (i.e. not static) ancestor

fixed

The element is positioned in a fixed position relative to the browser window

relative

The element is positioned relative to its normal position

static

(default value). The element is positioned (relative to others) in the order in which it appears in the document flow

 

Default Value:

static

JavaScript syntax:

e.g. object.style.position="fixed"

Inherited:

No

Animatable:

No

 


NAVIGATION LINKS
Contents | Prev | Next | CSS Properties


Desktop view | Switch to Mobile