The padding-left property of an element sets the padding space required on the left side of an element. The padding area is the space between the content of the element and it's border. A negative value is not allowed.

  • Initial value0
  • Applies toAll elements
  • InheritedNo
  • MediaVisual
  • Computed value<length> - the percentage as specified or the absolute length
  • AnimatableYes
  • CSS VersionCSS1, CSS2, CSS3
  • JavaScript
Formal syntax: [ <length> | <percentage> ]

padding-left: 10px;
padding-left: 10%;
  • <length>Specifies a positive fixed width.
  • <percentage>A percentage with respect to the width of the containing block.
  • inherit
.class {
   padding-left: 10em;

Click the button below to experiment with this property.

Give it a Try!


Last updated on 23rd March 2014 By Rene Spronk

View All CSS Properties

Errors? Please help to keep this list up to date, If you find any errors, please contact us, so that we can get them fixed.