marginBottom Property
Returns or sets a String that represents the width of the bottom margin for the specified object. Corresponds to the marginBottom property of an inline style attribute.
expression.MarginBottom
*expression * Required. An expression that returns one of the objects in the Applies To list.
Remarks
The String for the marginBottom property can be one of the following values:
Value | Description |
---|---|
auto |
Bottom margin measurement is the default setting.
The following code sets the bottom margin in the active document to the default setting.
|
width |
Floating-point number, followed by an absolute units designator (cm , mm , in , pt , pc , or px ) or a relative units designator (em or ex ).
The following code sets the bottom margin of the active document to 50 pixels.
|
percentage |
Integer, followed by a %. The value is a percentage of the height of the parent object.
The following code sets the bottom margin to 10 percent of the height of the browser window.
|
You can also use the margin property to set all margins at the same time. For example, the following code does the same as the example below but uses the margin property.
ActiveDocument.body.Style.margin = "auto 25px 2px 50px"
Example
The following example sets the top, right, bottom, and left margins for the active document.
With ActiveDocument.body.Style
.MarginTop = "auto"
.MarginRight = "25px"
.MarginBottom = "1%"
.MarginLeft = "50px"
End With
Applies to | FPHTMLStyle Object | IFPStyleState Object | IHTMLRuleStyle Object | IHTMLStyle Object