Gets the position of the object relative to the left edge of the next positioned object in the document hierarchy.
HRESULT IHTMLCurrentStyle::get_left(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. Default position, according to 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.
You should use the IHTMLCurrentStyle::left attribute only when the IHTMLCurrentStyle::position attribute is set; otherwise, the value of the IHTMLCurrentStyle::left attribute is ignored.
Because the value of the IHTMLCurrentStyle::left property is a string, you cannot use the property to calculate the position of the object in the document.
For more information about how to access the dimension and location of objects in the document through the Dynamic HTML (DHTML) Document Object Model (DOM), see Measuring Element Dimension and Location with CSSOM in Internet Explorer 9.