Name
margin-top, margin-right, margin-bottom, margin-left
Values:
length|percentage|auto
Example:
IMG { margin-top: 0px }
IMG { margin-right: 12px }
IMG { margin-bottom: 0px }
IMG { margin-left: 12px }
Applies to:
All elements
Inherited:
No
These properties specify the amount of margin on specific sides of
the element (as called by name). Values can be specified in length
units, as a percentage based on the size of the element’s
overall box width, or as auto, which automatically
fills in a margin amount based on other elements on the page.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access