O'Reilly logo

CSS Pocket Reference, 4th Edition by Eric A. Meyer

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

left

Values:

<length> | <percentage> | auto

Initial value:

auto

Applies to:

Positioned elements (that is, elements for which the value of position is something other than static)

Inherited:

No

Percentages:

Refer to the width of the containing block

Computed value:

For relatively positioned elements, left always equals –right; for static elements, auto; for length values, the corresponding absolute length; for percentage values, the declared value; otherwise, auto

Description:

Defines the offset between the left outer margin edge of an absolutely positioned element and the left edge of its containing block; or, for relatively positioned elements, the distance by which the element is offset to the right of its starting position.

Examples:

div#footer {position: fixed; left: 0;}
*.hanger {position: relative; left: −25px;}

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required