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
- Separates page elements with whitespace outside their borders.
- How deep it goes
- Defines margin within the box model and shows side-specific and shorthand CSS declarations, without exploring advanced layout behavior.
- Examples
- Shows a footer with four distinct pixel margins and a body rule containing `margin: 0 auto`.
- What you can do after
- Operate/configure it by changing CSS margin values to adjust exterior spacing on page elements.
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.
Also covered in
Related concepts
- CSS box modelpart of · The CSS box model describes each element as a rectangular box composed of content, padding, border, and margin areas that determine its dimensions and surrounding space.
- 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.
Questions about margin
What is margin?
Margin is a borrowing arrangement that allows an investor to purchase securities with funds supplied by a brokerage and secured by those securities.
Which Manning books explain margin?
Build a Website with ChatGPT and Design for Developers.
What is margin part of?
Margin is part of CSS box model. The CSS box model describes each element as a rectangular box composed of content, padding, border, and margin areas that determine its dimensions and surrounding space.
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.

