The padding clears an area around the content (inside the border) of an element. The padding is affected by the background color of the element.
The top, right, bottom, and left padding can be changed independently using separate properties. A shorthand padding property can also be used, to change all paddings at once.
Possible Values
| Value | Description |
length |
Defines a fixed padding (in pixels, pt, em, etc.) |
% |
Defines a padding in % of the containing element |
padding-top:25px;
padding-bottom:25px;
padding-right:50px;
padding-left:50px;
The padding property can have from one to four values.