DHTML Object Properties DHTML Objects
Sets or retrieves the left position of the object, in pixels.
HTML |
N/A |
Script |
object.style.pixelLeft [ = iLeft ] |
iLeft |
Integer specifying the position, in pixels. |
The property is read/write with no default value.
The pixelLeft property reflects the value of the CSS left attribute for positioned items. The property always returns zero for nonpositioned items because "left" does not have meaning unless the object is positioned. Use the offsetLeft property to calculate actual positions within the document area.
Unlike the left property, pixelLeft'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.
posLeft