Search within TutorialsPark

CSS padding-left Property


To set the padding of the contents left edge


Definition and Notes.

1. The CSS padding-left property is used to set the padding of the contents bottom edge

2. Negative values cannot be used.


Syntax:

CSS padding-left property. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note-If padding is specified in percent(px), the value is based on the size of the parent element.

Property Values

Value Description
length To specify the length using length units (px, pt, em , cm etc)
% To specify the length using percentages values
inherit The value for margin is inherited from the parent element

Specifications

Specs Value
Name padding-left
Value [<length> | <percentage>] | inherit
Initial Value 0
Applies to all elements.
Javascript syntax object.style.paddingLeft="10px"
Inherited No
Percentages refer to the width of containing box
Computed Value For percentages, same as declared value; for length values, the absolute length
Browser Support internetexplorer safari firefox opera chrome

Related Examples.