left

The left property specifies how far a box's left margin edge is offset to the right of the left edge of the box's containing block.

CSS2

Syntax

left: <length> | <percentage> | auto | inherit
Initial: auto
Applies To: positioned elements
Inherited: no
Percentages: refer to height of containing block
Media: visual

Values

left: value
Value Description
auto Depends on the values of other properties
length Fixed distance from the reference edge
percentage Percentage of the containing block's width

DOM

[window.]document.getElementById("element-id").style.left = "left";

Example | auto

Example | length

Example | percentage

Example | DOM

External

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification