| Syntax | selector {left: value;}
|
|---|---|
| Usage | The left property is used to set the left side position of an element's box. This property can be used for elements that have a position property value of relative, absolute, or fixed. The left property is used as follows:
This property is specified by using a length, percentage, or keyword, according to the syntax shown above. If a percentage value is used, the value will be a percentage of the containing block's width. CSS Example: The left properties are set for 2 different elements which are using the relative and absolute position properties. #tst1 {position: relative; left: 40px;}
#tst2 {position: absolute; left: 40px;}![]() ![]() ![]() |
| Keywords |
|
| Applies To | Elements that have a position property value of relative, absolute, or fixed. |
| Inherited | No |
| Initial Value | auto |
![]() ![]() The left properties are set for 2 different elements which are using the relative and absolute position properties. |