The best CSS left attribute Tutorial In 2024, In this tutorial you can learn Examples,Attribute definitions and instructions,Browser Support,Property Value,related articles,
The left edge of the image containing element disposed at a position 5 pixels left edge to right:
left attribute specifies the left edge of the element. This attribute defines the targeting elements comprising its border left margin offset between the left edge of the block.
If the value is "static" "position" property, then set the "left" property has no effect.
Note: If "position: static", the left property has no effect.
Defaults: | auto |
---|---|
inherit: | no |
version: | CSS2 |
JavaScript syntax: | object .style.left = "50px" |
Figures in the table represent the first browser to support the version number of the property.
属性 | |||||
---|---|---|---|---|---|
left | 1.0 | 5.5 | 1.0 | 1.0 | 5.0 |
value | description |
---|---|
auto | Defaults. Calculate the left edge of the browser location. |
% | Set as a percentage of the containing element meter left position. You can use a negative value. |
length | Use px, cm, and other units set to the left position of the element. You can use a negative value. |
inherit | Provisions should inherit the property value left from the parent element. |
CSS tutorial: CSS Positioning