Margins
These properties allow the author to control a box’s margin—the area outside its border. You can also read The CSS Box Model for more information about margins.
In this Section
- margin-top
sets the top margin on of an element - margin-right
sets the right margin of an element - margin-bottom
sets the bottom margin on of an element - margin-left
sets the left margin on of an element - margin
a shorthand property that sets the margin on all four sides of an element
Previous: max-width
Next: margin-top
User-contributed notes
Add a note
To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.
