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)

Example

 p{padding:1em;}
div{padding:10px; 5px;}

Introduced in CSS version
1
Applies to elements
All
Inherited
pad
Browser Support
BrowsersIE ieFirefox firefoxSafari safariOpera operaChrome chrome
Versions51160.2
Belongs to:

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