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


This property defines the y (vertical) coordinate for a positioned element, relative to the top of the enclosing object or 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, which lets this property function as determined by the browser or as defined by the parent element. Browsers often assume pixels as a default measurement if none is specified.


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

Browser and CSS Support Notes

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

(X)HTML Elements
CSS Properties
Back: text-transform Next: unicode-bidi
< Home | About | Chapters | Examples | Errata | Reference | Site Map >