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

margin-left

By , About.com Guide

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
About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

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

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

All rights reserved.