Style.marginLeft Property
SharePoint Designer Developer Reference |
Sets or returns a String that represents the width of the left margin for a page or block element. Corresponds to the marginLeft property of an inline style attribute.
Syntax
expression.MarginLeft
expression Required. A variable that represents a Style object.
Remarks
The String for the marginLeft property can be one of the following values:
Value | Description | ||
---|---|---|---|
auto |
Left margin measurement is the default setting. The following code sets the left margin in the active document to the default setting.
|
||
width |
Floating-point number, followed by an absolute units designator ( The following code sets the left margin of the active document to 50 pixels.
|
||
percentage |
Integer, followed by a percent sign (%). The value is a percentage of the width of the parent object. The following code sets the left margin to 10 percent of the width of the browser window.
|
Note
You can also use the margin property to set all margins at the same time or to set all margins to the same setting.
See Also