asp.net.ph

Skip Navigation Links

pixelTop Property

DHTML Object Properties   DHTML Objects


Sets or retrieves the top position of the object, in pixels.

Syntax


HTML N/A
Script object.style.pixelTop [ = iTop ]

Possible Values


iTop Integer value specifying the top position, in pixels.

The property is read/write with no default value.

Remarks

The pixelTop property reflects the value of the CSS top attribute for positioned items. The property always returns zero for nonpositioned items because "top" is not meaningful unless the object is positioned. Use the offsetTop property to calculate actual positions within the document area.

Unlike the top property, pixelTop's value is an integer, not a string, and is always interpreted in pixels.

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

See Also

posTop



>

© 2025 Reynald Nuñez and asp.net.ph. All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note