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