We use cookies to improve your experience. Learn more in our Privacy policy.
padding
This property is a shorthand property to define the padding area on all sides of an element.
Example
Initial value | Initial value of all properties that this property is shorthand of. Check individual properties. |
Applies to | all elements, except table-row-group, table-header-group, table-footer-group, table-row, table-column-group and table-column. |
Syntax
padding: 1em;
Values
The size of the padding as a fixed value.
The size of the padding as a percentage, relative to the width of the containing block.
Browser support
padding | 1 | 12 | 1 | 4 | 3.5 | 1 |