CSS padding-left Property

Description

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 value
0
Applies to
All elements
Inherited
No
Media
Visual
Computed value
<length> - the percentage as specified or the absolute length
Animatable
Yes
CSS Version
CSS1, CSS2, CSS3
JavaScript syntax
object.style.paddingLeft

Syntax

padding-left: [ <length> | <percentage> ]

Values

  • <length>Specifies a positive fixed width.
  • <percentage>A percentage with respect to the width of the containing block.
  • inherit

Example

.class {
   padding-left: 10em;
}

Give it a Try

Click the button below to experiment with this property.

Give it a Try!

Browser Support

Desktop
Explorer Edge Chrome Firefox Opera Safari
412113.51
Tablets / Mobile
Android Chrome Firefox Opera Safari Samsung
≤37184Yes1Yes