javascript STYLE left

leftNN 6 IE 4 DOM 2  

Read/Write  

For positionable elements, defines the position of the left edge of an element's box (content plus left padding, border, and/or margin) relative to the left edge of the next outermost block content container. When the element is relative-positioned, the offset is based on the left edge of the inline location of where the element would normally appear in the content.

For calculations on this value, use parseFloat( ) on the returned value; or, in IE, retrieve the pixelLeft or posLeft properties, which return genuine numeric values.

 
Example
 
document.getElementById("blockD2").style.left = "45px";
 
Value

String consisting of a numeric value and length unit measure, a percentage, or auto.

 
Default

auto


  • mark
    #1
    2009-12-08
    [Quote]
    not working dude...
  • javascript manual
    #2
    2009-12-08
    [Quote]
    [mark: not working dude...]
    Did you add CSS {position:relative;} or {position:absolute;}?
  • Mike
    #3
    2010-02-12
    [Quote]
    This works for me. Thank you!
mark
javascript manual
Mike

1860,Nickname,Homepage or email,Comments here,Add comment