marginmargin*
*Contents  *Index  *Topic Contents
*Previous Topic: list-style-type
*Next Topic: margin-bottom

margin

Description

Sets the margin on all four sides of an object with a single style sheet rule.

Syntax

{ margin: [ length | percentage | auto] {1,4}}

Remarks

This is a composite property. The "{1,4}" means that up to four values can be specified. Specifying one value applies that value to all four sides; specifying two values applies the first value to the top and bottom, and the second value to the left and right. Specifying three values applies the first to the top, the second to the right and left, and the third to the bottom. Negative margins are supported except for top and bottom margins on inline elements. Percentage values refer to the parent element's width.

This attribute is not inherited.

Applies To

BLOCKQUOTE, BODY, CAPTION, CENTER, DD, DIR, DIV, DL, DT, EMBED, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, HR, IFRAME, IMG, INPUT, LEGEND, LI, LISTING, MARQUEE, MENU, OBJECT, OL, P, PLAINTEXT, PRE, SPAN, TABLE, TEXTAREA, TD, TH, TR, UL, XMP

Scripting Property

margin

See Also

margin-bottom, margin-left, margin-right, margin-top


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.