1. Home
  2. Computing & Technology
  3. Web Design / HTML

margin-left

By Jennifer Kyrnin, About.com

margin-left Description:

The margin-left property defines the left margin of the element.

margin-left in CSS Versions:

margin-left Syntax:

margin-left: <length> | <percentage> | auto

  • length
    A specific length (include unit of measure).
  • percentage
    A percentage of the height of the closest block-level ancestor.
  • auto
    Allows the user-agent to define the margin based on inheritance and pre-set user-agent rules.

margin-left Initial Value:

0

margin-left Applies To:

All elements.

margin-left Inheritance:

This property is not inherited.

margin-left Browser Support:

margin-left Examples:

standard margin-left

<p style="margin-left : 2em;">
This paragraph has a 2 em left margin.
</p>

margin-left Special Notes:

  • Negative values are permitted, but may be affected by implementation limits.

More margin-left Information:

Return to the Style Library

Explore Web Design / HTML

More from About.com

  1. Home
  2. Computing & Technology
  3. Web Design / HTML
  4. CSS
  5. Style Properties
  6. CSS Style Property: margin-left

©2008 About.com, a part of The New York Times Company.

All rights reserved.