Syntax

Property values

Type: VARIANT

one of the values listed in Possible Values.

auto (auto)

Default. Default position according to the regular HTML layout of the document.

length (length)

Floating-point number, followed by an absolute units designator (cm, mm, in, pt, or pc) or a relative units designator (em, ex, or px). For more information about the supported length units, see CSS Values and Units Reference.

percentage (percentage)

Integer, followed by a percent sign (%). This value is a percentage of the height of the parent object.

Examples

The following example uses the IHTMLRuleStyle::top property to change the position of the green div. In the example below, there are four div elements with absolute positioning. The green div is positioned 50 pixels from the top.