How to Css: Working with Padding
Wednesday, 3. February 2010
Padding can be applied to the outside edges of the content are of any block level or inline element. Padding creates the space between the edge of the element and its content.
Like margins, padding can be applied to individual sides of a box:
h1{padding-top: 0px;}
h2{padding-right: 0px;}
h3{padding-left: 0px;}
h4{padding-bottom: 0px;}
Padding can also be applied using a single shorthand property. If one padding value is specified, it applies to all sieds of an element.
If two values are specified, the top and bottom margines are set to the first value and the right and left margins are set to the second value.
If three values are specified, the top is set to the first value, the left and right to the second value and the bottom is set to the third value.
If four values are specified, they apply to the top, right, bottom and left.
