Margin
Margin is a borrowing arrangement that allows an investor to purchase securities with funds supplied by a brokerage and secured by those securities.
Build a Website with ChatGPT
Margin is the whitespace outside an element's border that separates the element from surrounding content or the viewport edge.
- How it is used
- Uses margin to separate page elements and customize their outer spacing.
- How deep it goes
- Defines margin within the box model and demonstrates side-specific properties and shorthand without deeper layout behavior.
- Examples
- Shows footer margins with four longhand declarations and shorthand, plus a body rule using margin: 0 auto.
- What you can do after
- Apply it via CSS properties to increase or decrease an element’s outer spacing.
Design for Developers
A margin is the empty space separating a layout element from adjacent elements or the containing boundary.
- How it is used
- Establishes consistent vertical rhythm in typography and predictable spacing within layout grids.
- How deep it goes
- Calculates margins from font size, line height, and baseline units, then applies them to headings, paragraphs, and grid columns.
- Examples
- Uses a 16px paragraph margin, type-specific top margins, and a 1200px grid with 22px outer margins and 20px column gaps.
- What you can do after
- Apply it via baseline calculations to tune text spacing and define consistent grid relationships.
Related concepts
- CSS box modelpart of · The CSS box model represents each element as a rectangular box comprising content, padding, border, and margin areas.
- financial leverageused by · Financial leverage is the use of borrowed funds to increase the scale of assets or investments relative to an investor’s or company’s equity.
- CSS Gridused by · CSS Grid is a CSS layout system for arranging elements in two-dimensional rows and columns.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

