On Collapsing Margins

satya - 6/28/2013 11:02:05 AM

Understanding collapsing margins in CSS

Understanding collapsing margins in CSS

Search for: Understanding collapsing margins in CSS

satya - 6/28/2013 11:02:12 AM

Here is the spec on it

Here is the spec on it

satya - 6/28/2013 11:22:57 AM

So what are they?

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.

satya - 6/28/2013 11:24:15 AM

General rule


adjoining vertical margins collapse except..
horizontal margins never collapse