Margins
suggest changeSyntax
- margin: <top & right & bottom & left>;
- margin: <top>, <left & right>, <bottom>;
- margin: <top & bottom>, <left & right>;
- margin: <top>, <right>, <bottom>, <left>;
- margin-top: <top>;
- margin-right: <right>;
- margin-bottom: <bottom>;
- margin-left: <left>;
Parameters
Parameter | Details | ————— | –––––––––– | 0 | set margin to none | auto | used for centering, by evenly setting values on each side | units (e.g. px) | see parameter section in Units for a list of valid units | inherit | inherit margin value from parent element | initial | restore to initial value |
Remarks
More on “Collapsing Margins”: here.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents