style.position (Property)

A flag to indicate relative or absolute positioning of an element.

Availability:

CSS level - 2
DOM level - 2
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myStyle.position = "absolute"
-myStyle.position = "relative"
CSS syntax:position: aControl
Argument list:aControlA positioning control

In MSIE, this value returns a floating point value reflecting the current value of the position attribute for the styleSheet object.

You can define other values for this according to the available keywords:

The absolute keyword applies to element objects that are positioned with respect to the document boundaries.

The relative keyword applies to element objects that are positioned with respect to a parent or containing element object.

The fixed keyword is defined in the CSS standard to mean that an element object should be positioned with respect to the display window.

The normal keyword is equivalent to the CSS defined static keyword and applies to objects whose position is controlled by the text flow. These can be block or inline structured objects.

Warnings:

See also:Document.layers[], Dynamic positioning, Measurement units, style.overflow

Property attributes:

ReadOnly.