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)
- Live Example
- Play with the code in the textarea below.
- Introduced in CSS version
- Applies to elements
- Browser Support
Browsers IE Firefox Safari Opera Chrome Versions 5 1 1 6 0.2
See the full list CSS properties and browser support: CSS Properties