posLeftposLeft*
*Contents  *Index  *Topic Contents
*Previous Topic: position
*Next Topic: posTop

posLeft

Description

Sets and retrieves the left position of the element in the units specified by the CSS left attribute. Unlike the left property, this property's value is a floating-point number, not a string.

Syntax

object.posLeft[ = posLeft]

Settings

This read-write property takes any valid floating-point number. Setting this property changes the value of the left position but leaves the units designator for the property unchanged.

Remarks

This property reflects the value of the CSS left attribute for positioned items. This property always returns zero for nonpositioned items since left does not mean anything unless the object is positioned. Use the offsetLeft property to calculate actual positions within the document area.

For more information on how to access the dimension and location of elements on the page through the document object model, see Measuring Element Dimension and Location.

Example

The following JScript example moves the first IMG element to the left by 10 units.

document.all.tags("IMG").item(0).style.posLeft -= 10;

Applies To

style

CSS Attribute

left

See Also

pixelLeft


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.