Definition:
CSS Margin property is used to put a space outside defined borders. You can put margins individually into each side of the elements by using the following syntax.
Margin Properties:
Margin Properties | Description |
margin | Applies margin to all four sides. |
margin-top | Applies margin to element’s top. |
margin-right | Applies margin to element’s right. |
margin-bottom | Applies margin to element’s bottom. |
margin-left | Applies margin to element’s left. |
margin:auto | Applies margin to auto to horizontally center. |
margin: inherit | Applies margin inherited to its parent elements. |
margin: collapse | collapse margin. |
Donate to support writers
You may be interested in the following topics:
- CSS margin:collapse;
- CSS margin:inherit;
- CSS Margin: auto;
- CSS margin-left
- CSS margin-bottom
- CSS margin-right
- CSS Margin-top
- CSS Margin
- CSS Margin (All Properties)