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.
Get Web Design in a Nutshell now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.