left property
Sets or retrieves the position of the object relative to the left edge of the next positioned object in the document hierarchy.
![]() |
Syntax
Integer value = object.put_left(Variant v);Integer value = object.get_left(Variant* sPosition);
Property values
Type: VARIANT
auto (auto)
-
Default. Default position, according to the regular HTML layout of the page.
length (length)
-
Floating-point number, followed by an absolute units designator (
cm,mm,in,pt, orpc) or a relative units designator (em,ex, orpx). For more information about the supported length units, see CSS Values and Units Reference. percentage (percentage)
-
Integer, followed by a percent sign (%). The value is a percentage of the width of the parent object.
String format
<length>
|
<percentage>
| auto
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | no |
| Initial Value |
Standards information
- CSS 2.1, Section 9.3.2
Remarks
You should use the IHTMLStyle::left attribute only when the IHTMLStyle::position attribute is set; otherwise, the value of the IHTMLStyle::left attribute is ignored.
Because the value of the IHTMLStyle::left property is a string, you cannot use the property in script to calculate the position of the object in the document; instead, you should use the IHTMLStyle::pixelLeft property or the IHTMLStyle::posLeft property.
Because the value of the IHTMLStyle::left property is a string, you cannot use the property to calculate the position of the object in the document.
Because the value of the IHTMLStyle::left property is a string, you cannot use the property in script to calculate the position of the object in the document; instead, you should use the IHTMLStyle::pixelLeft property or the IHTMLStyle::posLeft property.
For more information about how to access the dimension and location of objects on the page through the Dynamic HTML (DHTML) Document Object Model (DOM), see Measuring Element Dimension and Location with CSSOM in Internet Explorer 9.
Requirements
|
Minimum supported client | Windows XP [desktop apps only] |
|---|---|
|
Minimum supported server | Windows Server 2003 [desktop apps only] |
|
Header |
|
|
IDL |
|
|
DLL |
|
Build date: 11/12/2012
