Language References
Sets or retrieves the right position of the object in the units specified by the cascading stylesheet ( CSS ) right attribute.
HTML |
N/A |
Script |
object.style.posRight [ = iRight ] |
iRight |
Any valid floating-point number. |
The property is read/write with no default value.
This property reflects the value of the cascading stylesheet ( CSS ) right attribute for positioned items. This property always returns zero for nonpositioned items because "right" is not meaningful unless the object is positioned.
Setting this property changes the value of the right position but leaves the units designator for the property unchanged.
Unlike the right property, this property's value is a floating-point number, not a string.
For more information on how to access the dimension and location of elements on the page through the document object model, see Measuring Element Dimension and Location.
The following sample demonstrates the use of the posRight object property to set a positioned DIV ten pixels from the right of the client area.
oDiv.style.posRight = 10;
pixelRight