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

right


This property defines the x (horizontal) coordinate for a positioned element, relative to the right side of either the containing element or browser window if directly within the <body>. Values can be specified as lengths (inches, pixels, and so on), as a percentage of the containing object's dimensions, or as auto. Most browsers assume pixels as the measure if not defined explicitly.

Examples


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

Browser and CSS Support Notes


CSS2
IE 4, 5, 5.5, 6
Nav 6, 7
Opera 4, 5, 6, 7

(X)HTML Elements
CSS Properties
Back: quotes Next: size
< Home | About | Chapters | Examples | Errata | Reference | Site Map >