Gets the position of the object relative to the right edge of the next positioned object in the document hierarchy.
HRESULT IHTMLCurrentStyle::get_right(VARIANT *p);
- Pointer to a variable of type VARIANT of type VT_BSTR that receives one of the values listed in Possible Values.
auto Default. Position is determined by the regular HTML layout of the document. length 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 Length Units Reference.
percentage Integer, followed by a percent sign (%). The value is a percentage of the width of the parent object.
Returns S_OK if successful, or an error value otherwise.
Only use the IHTMLCurrentStyle::right attribute when the IHTMLCurrentStyle::position attribute is set; otherwise, the value of the IHTMLCurrentStyle::right attribute is ignored.
You cannot use the IHTMLCurrentStyle::right property to calculate the position of the object in the document, because the value of the IHTMLCurrentStyle::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.