margin

distance between element's border and surrounding elements' borders

Example

1

Description

distance between element's border and surrounding elements' borders

This is a shortcut property that can set up to all four margin sizes in one statement. The number of values given determines which margins are affected. 4 values: top, right, bottom, left 3 values: top, right and left, bottom 2 values: top and bottom, right and left 1 value: all four margins

Values

Value Description
Values
percentagea relative value
lengtha CSS length value (in pixels, ems, inches, etc.)
autobrowser will calculate margins