Style.marginBottom Property

SharePoint Designer Developer Reference

Returns or sets a String that represents the width of the bottom margin for a page or block element. Corresponds to the marginBottom property of an inline style attribute.

Syntax

expression.MarginBottom

expression   Required. A variable that represents a Style object.

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.

Visual Basic for Applications
ActiveDocument.body.Style.marginBottom = "auto"
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.

Visual Basic for Applications
ActiveDocument.body.Style.marginBottom = "50px"
percentage

Integer, followed by a percent sign (%). 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.

Visual Basic for Applications
ActiveDocument.body.Style.marginBottom = "10%"

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