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

padding112143.51

We use cookies to improve your experience. Learn more in our Privacy policy.

×