Menu Riverview Church

MARGIN

The margin property is shorthand for margin-top, margin-right, margin-bottom, and margin-left.

SYNTAX

CSS

margin: value;

JS

object.style.margin = "value";

VALUES

<'margin'> = <'margin-top'>{1,4}
<'margin-top'> = <length-percentage> | auto
<length-percentage> = [ <length> | <percentage> ]
<length>

Specifies the length using a number followed by a unit of measurement.

<percentage>

Specifies the percentage using a number followed by a percent sign (%).

auto

Automatically specified by the user agent.

INITIAL

0

EXAMPLES

AUTO

LENGTH

PERCENTAGE

JS

INTERNAL

margin-bottom

margin-left

margin-right

margin-top

EXTERNAL

World Wide Web Consortium (W3C)