pixelToppixelTop*
*Contents  *Index  *Topic Contents
*Previous Topic: pixelLeft
*Next Topic: pixelWidth

pixelTop

Description

Sets or retrieves the top position of the element, in pixels. Unlike the top property, this property's value is an integer, not a string, and is always interpreted in pixels.

Syntax

object.pixelTop[ = pixelTop]

Settings

This read-write property can be any integer value. Setting this property changes the value of the top position without changing the units designator.

Remarks

This property reflects the value of the CSS top attribute for positioned items. This property always returns zero for nonpositioned items since top does not mean anything unless the object is positioned. Use the offsetTop 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.

Applies To

style

CSS Attribute

top

See Also

posTop


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