NOTICE: This website is no longer updated or supported - as such many of the techniques used to build it may seem antiquated in the modern day. It is preserved for historical reasons only.

HTML XHTML The Complete Reference
home » reference » appendix b » css1 / css2 properties

left


This property defines the x (horizontal) coordinate for a positioned element, relative to the left side of the containing element or browser window. Given that the containing element itself may be positioned, the value of left does not always relate to the distance from the browser window. Values can be specified as lengths (inches, pixels, and so on), as a percentage of the containing object's dimensions, or as auto.

Examples


#div1 {position: absolute; left: 120px; top: 50px;}
#div2 {position: absolute; left: 30%; top: 50%;}
#div3 {position: absolute; left: auto; top: auto;}

Browser and CSS Support Notes


CSS2
IE 4, 5, 5.5, 6
Nav 4, 4.5-4.8, 6, 7
Opera 5, 6, 7

(X)HTML Elements
CSS Properties
Back: height Next: letter-spacing
< Home | About | Chapters | Examples | Errata | Reference | Site Map >