Sets or retrieves the position of the object relative to the right edge of the next positioned object in the document hierarchy.
A Variant that specifies or receives one of the following values:
Default. Position is determined by the regular HTML layout of the page.
Floating-point number, followed by an absolute units designator (
pc) or a relative units designator (
px). For more information about the supported length units, see CSS Values and Units Reference.
Integer, followed by a percent sign (%). The value is a percentage of the width of the parent object.
|Applies To||All elements|
- CSS 2.1, Section 9.3.2
Only use the right attribute when the position attribute is set; otherwise, the value of the right attribute is ignored.
You cannot use the right property in script to calculate the position of the object in the document, because the value of the right property is a string. Instead, use the pixelRight property or the posRight property.
You cannot use the right property to calculate the position of the object in the document, because the value of the right property is a string.
For more information about how to access the dimension and location of objects on the page through the DHTML Object Model, see Measuring Element Dimension and Location with CSSOM in Internet Explorer 9.
This example uses the right attribute to set a div object 50 pixels from the right of the client area.
Build date: 11/17/2013