Easy Tutorial
❮ Coll Datalist Options Prop Canvas Strokestyle ❯

Style left Property


Definition and Usage

The left property sets or returns the left position of a positioned element.

This property specifies the left position of the element, including padding, scrollbars, borders, and margins.

Tip: A positioned element is an element whose position property is set to: relative, absolute, or fixed.

Syntax

Setting the left property:

Returning the left property:

Value Description
auto Default. The browser calculates the left position.
length Defines the left position of the element from the left edge of the nearest positioned parent element using units like px, cm, etc. Negative values are allowed.
% Defines the left position of the element as a percentage of the nearest positioned parent element's left edge.
inherit The left property value is inherited from the parent element.

Browser Support

All major browsers support the left property.

Note: IE7 and earlier versions do not support the "inherit" value. IE8 requires a !DOCTYPE to support "inherit". IE9 supports "inherit".


Example

Setting the left position of a button:

❮ Coll Datalist Options Prop Canvas Strokestyle ❯