The padding-*** property sets the top, bottom, left, and right paddings of an element.
(*** = top, bottom, left, and right)
div {
padding-top: 5px;
padding-right: 10px;
padding-bottom: 15px;
padding-left: 20px;
}
Property |
Value |
Explanation |
padding-top |
length, %, or auto |
the top padding |
padding-right |
length, %, or auto |
the right padding |
padding-bottom |
length, %, or auto |
the bottom padding |
padding-left |
length, %, or auto |
the left padding |
Example