To shorten the code, it is possible to specify all the padding properties in one shorthand property. The shorthand property for all the padding properties is called "padding". This example demonstrates a shorthand property for setting all of the padding properties in one declaration, can have from one to four values.
4 Values: padding: 25px 50px 75px 100px;
|
3 Values: padding: 25px 50px 75px;
|
2 Values: padding: 25px 50px;
|
1 Value: padding: 25px;
|
The blue area is a div element with background set to bue and includes both padding and content of that element. The white space is created because the content has different amount of lines as content.