CSS Margin Property
The CSS Margin Reference covers the use of Margin. Includes useful Example, and some background information.
The CSS margin property, is the short-hand way of specifying margin in css.
In web design, margin is generally used to apply white space between elements.
Possible Values
- auto (Default)
- Units of Measurement
Using CSS margin
This example sets the margin in the following format: Top Right Bottom Left.
p {
margin: 1em 2em 4em 3em;
}
The above is the equilivant of:
p {
margin-top: 1em;
margin-right: 2em;
margin-bottom: 4em;
margin-left: 3em;
}
Inherited? NO!