B.63. margin
This property sets the size of the margins surrounding the selected element(s).
The size for each side may be set individually using the margin-bottom, margin-left, margin-right, and margin-top properties.
Inherited: No
See also: Section B.64margin-bottom, Section B.64margin-left, Section B.64margin-right, Section B.64margin-top
B.63.1. Value
You can specify from one to four different values to specify different margin sizes for each side of the element, as shown in Table B-6.
Each value can be a CSS length (px, pt, em, etc.), a percentage of the parent element's width (even for the top and bottom margins[9]), or the auto constant, which tells the browser automatically to calculate and use a margin that will allow the element ...
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