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 value0
- Applies toAll elements
- InheritedNo
- MediaVisual
- Computed value<length> - the percentage as specified or the absolute length
- AnimatableYes
- CSS VersionCSS1, CSS2, CSS3
- JavaScript syntaxobject.style.paddingLeft
Syntax
Formal syntax: [ <length> | <percentage> ] padding-left: 10px; padding-left: 10%;
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.
Browser Support
1+![]() | 6+![]() | 1+![]() | 1+![]() | 8+![]() |
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.