Description

Sets the space around the four edges of an elements content up to but not including borders. Padding accepts up to four values. One value all for sides are given the same padding. Two values and the top and bottom have the first value, right and left the second. Three values top is given the first value, left and right the second and bottom third. Four values are given clockwise from top (top, right, bottom, left)

See also:

  • padding-bottom
  • margin
Live Example
Play with the code in the textarea below.

Introduced in CSS version
1
Applies to elements
All
Inherited
Yes
Browser Support
BrowsersIEFirefoxSafariOperaChrome
Versions51160.2
Belongs to:

See the full list CSS properties and browser support: CSS Properties