By using the padding property, you can set all four padding lengths at once. Here's how it works:
The following are examples of code for using the padding property in these various ways: /* All paddings will be 2em. */ BODY { padding: 2em } /* The top and bottom padding will be 1em, and the right and left padding will be 2em. */ BODY { padding: 1em 2em } /* The top padding will be 1em, the right and left will be 2 em, and the bottom padding will be 3em. */ BODY { padding: 1em 2em 3em } /* All paddings will be set, and values will be applied in top/right/bottom/left order. */ BODY { padding: 1em 3em 5em 7em } |