Name

margin-top — IE4 P/P | IE5 P/Y | NN4 P/P | Op3 Y/-

Synopsis

This sets the size of the top margin of an element. Negative values are permitted, but caution is recommended.

Example

UL {margin-top: 0.5in;}

Values

<length> | <percentage> | auto

Default

0

Inherited

no

Applies to

all elements

Percentage values refer to the width of the closest block-level ancestor.

Get Cascading Style Sheets: The Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.