padding: 1em;
padding: 5% 10%;
padding: 1em 2em 2em;
padding: 5px 1em 0 2em;
padding: inherit;
padding: initial;
padding: revert;
padding: revert-layer;
padding: unset;
The padding
property may be specified using one, two, three, or four values. Each value is a <length>
or a <percentage>
. Negative values are invalid.
- When one value is specified, it applies the same padding to all four sides.
- When two values are specified, the first padding applies to the top and bottom, the second to the left and right.
- When three values are specified, the first padding applies to the top, the second to the right and left, the third to the bottom.
- When four values are specified, the paddings apply to the top, right, bottom, and left in that order (clockwise).