Name
left
Values:
<length> | <percentage> | auto
| inherit
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, see Note; for static
elements, auto
; for length values, the corresponding absolute length; for percentage values, the specified value; otherwise, auto
.
Note:
For relatively positioned elements, the computed value of left
always equals -right
.
Description:
This property defines the offset between the left outer margin edge of a positioned element and the left edge of its containing block.
Examples:
div#footer {position: fixed; left: 0;} *.hanger {position: relative; left: −25px;}
Supported by:
Firefox, Internet Explorer, Opera, Safari.
Get CSS Pocket Reference, 3rd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.