- Core Content
- Block and inline elements have core content area
defined by their properties
- Padding
- Surrounds the core content giving space before the border, default is none
- Border
- Colour, width and style can be specified. Default is none
- Margin
- Distance between this box and the previous and folowing ones.
- Margin is transparent
- Background
- Background and padding of core content specified as a colour or an image
- Margin and padding can be defined separately (top, right, bottom, left in that order)
- Two elements with bottom and top (vertical) margins will have the two collapsed to one (maximum value of the two)
- Total width is width of margin, border, padding and width of core content
- Be careful how you define border width if you want precise spacing. Some widths (such as thin) are for the browser to define
- Most block-level elements have default margin settings and these may vary
* {margin:0; padding:0}
will get rid of most of these defaults in most browsers