Name

pixelLeft, pixelTop — NN n/a IE 4 DOM n/a

Synopsis

Read/Write

For positionable elements, define the position of the left and top edges of an element’s box (content plus left padding, border, and/or margin) relative to the left and top edges of the next outermost block content container. When the element is relative-positioned, the measure is based on the left edge of the inline location of where the element would normally appear in the content. Use these properties for calculation (including path animation) instead of the left and top properties, which store their values as strings with the unit names.

Example

document.all.myDIV.style.pixelLeft++

Value

Integer.

Default

None.

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.