Skip to Content


CSS Reference / margin-top

margin-top

Sets the top margin of an element. Negative values are allowed.

Values:

  • auto
  • length
  • %

Examples:

  1. margin-top: 50px;
  2. margin-top: -30em;

Browser support:

  • Internet Explorer 4+
  • Netscape 4+
  • Opera 3.5+

Related properties:

back to list



Search

Sponsors

Logo design for $149

Advertise here