CSS2 » Properties » margin-left

Version: Level 1

Compability: IE4+  N4+

margin-left : length | percentage | auto
The auto value directs the browser to automatically calculate the left margin. By declaring auto, you can ensure that any previous declaration will not effect the left margin.
The percentage value is based upon the total width being defined as 100%.
The length value can be in any of the following seven units. Use the abbreviation.
Length Abbrev.
centimeters cm
ems em
inches in
millimeters mm
picas pc
pixels px
points pt

The margin-left property allows you to set the dimensions for the left margin. This property is not inherited.


p { margin-left: 25mm; }
p { margin-left: 1.0in; }
p { margin-left: 15pc; }
p { margin-left: 36pt; }
p { margin-left: 11.5%; }
p { margin-left: auto; }
Language(s): CSS2

See Also: