« CSS « CSS Reference


The left CSS property specifies part of the position of positioned elements.

For absolutely positioned elements (those with position : absolute or position: fixed), it specifies the distance between the left margin edge of the element and the left edge of its containing block.


left: <length> | <percentage> | auto | inherit ;


A length, can be negative, zero, or positive.
A percentage of the containing block's width.


View the live example

#example_3 {
  width: 600px;
  height: 400px;
  background-color: #FFC7E4;
  position: relative;
  top: 20px;
  left: 20px;

#example_4 {
  background-color: #FFD7C2;
  right: 20px;


Browser compatibility

  • Desktop
  • Mobile

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
Basic support 1.0 1.0 (1.7 or earlier) 5.5 5.0 1.0
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support 1.0 1.0 (1) 6.0 6.0 1.0

See also

position , top , right , bottom


Tags (2)

Edit tags

Attachments (0)


Attach file