Extensible HyperText Markup Language

XHTML.com recommends: PSD to HTML Slicing Service

margin-top

Definition

The margin-top property specifies the width between the element's top border and the element's outer edge, represented by the yellow highlighted area in the illustration below.

Illustration of the CSS box model. The area between the top border and the outer edge is highlighted in yellow.

Example

  1. h1 {margin-top: 10px}

Characteristics

Possible values

  • A specific length, a percentage of the parent element's width or the keyword auto.
  • inherit
    Use the same computed value as the parent element for this property.

Default value

0

Applies to

Most elements

Inherited

No

See also