The margin property controls the whitespace outside an element’s border. It creates space between neighboring elements and between an element and the browser viewport. Positive values separate elements; negative values can make them overlap. section 4.2.3
Set margins on one or more sides:
- Supply one value when every side should have the same margin. section 4.2.3
Give a footer breathing room
A footer can use different spacing on each side: footer { margin-top: 24px; margin-right: 40px; margin-bottom: 32px; margin-left: 48px; }. The shorthand version is footer { margin: 24px 40px 32px 48px; }. To adjust the page, increase the margin when content feels crowded or decrease it when items feel disconnected; keep the px unit in place. section 4.4
element {
margin-top: top-value;
margin-right: right-value;
margin-bottom: bottom-value;
margin-left: left-value;
}
Browse the side-by-side margin declarations to see how each side is controlled. section 4.2.3




