CSS Padding

CSS Padding :

The padding  clears a place around this content (inside the border) of an element. The padding  is afflicted with the back ground color of the element.
The most truly effective, proper, base, and left padding  may be changed individually using split properties. A shorthand padding  property can also be used, to improve all paddings at once.

Padding – Individual sides :

it is possible to specify different padding for different sides:

Example :

padding-top:25px;
padding-bottom:25px;
padding-right:50px;
padding-left:50px;

Padding – Shorthand property :

To shorten the code, it is possible to specify all the padding properties in one property. This is called a shorthand property.
The shorthand property for all the padding properties is “padding”:

Example :

padding:25px 50px;



Posted in CSS

Leave a Reply

Your email address will not be published. Required fields are marked *