On Collapsing Margins

Understanding collapsing margins in CSS

Search for: Understanding collapsing margins in CSS

Here is the spec on it

In CSS, the adjoining margins of two or more boxes (which might or might not be siblings) can combine to form a single margin. Margins that combine this way are said to collapse, and the resulting combined margin is called a collapsed margin.


adjoining vertical margins collapse except..
horizontal margins never collapse