Take a look at the following code. What do you notice about the margin values?
margin: 6px 12px 6px 12px;
The top and bottom values of margin are the same (
6px) and the left and right value of margin are also the same (
Just like the padding shortcut, when you're certain that the top and bottom values for margin will equal each other, and that the left and right values for padding will also equal each other, you can use the following shortcut:
margin: 6px 12px;
The first value,
6px, sets a margin value for the top and bottom sides of the box. The second value,
12px sets a margin value for the left and right sides of the box.