CSS Padding
The padding clears an area around the content (inside the
border) of an element. The padding is affected by the background color of the
element.
Padding - Shorthand property
The padding property can have from one to four values.- padding:25px 50px 75px 100px;
- top padding is 25px
- right padding is 50px
- bottom padding is 75px
- left padding is 100px
- padding:25px 50px 75px;
- top padding is 25px
- right and left paddings are 50px
- bottom padding is 75px
- padding:25px 50px;
- top and bottom paddings are 25px
- right and left paddings are 50px
- padding:25px;
- all four paddings are 25px
All CSS Padding Properties
The number in the "CSS" column indicates in which CSS version the property is defined (CSS1 or CSS2).
Property
|
Description
|
Values
|
padding
|
A shorthand property for setting all the padding properties in one declaration
|
padding-top
padding-right padding-bottom padding-left |
padding-bottom
|
Sets the bottom padding of an element
|
length
% |
padding-left
|
Sets the left padding of an element
|
length
% |
padding-right
|
Sets the right padding of an element
|
length
% |
padding-top
|
Sets the top padding of an element
|
length
% |
No comments:
Post a Comment
Please write your view and suggestion....