DEV Community

The Rules of Margin Collapse in CSS Series' Articles

Back to Top's Series
Introduction of Margin Collapse in CSS
Cover image for Introduction of Margin Collapse in CSS

Introduction of Margin Collapse in CSS

8
Comments
1 min read
Only vertical margins collapse
Cover image for Only vertical margins collapse

Only vertical margins collapse

1
Comments
1 min read
Only adjacent elements collapse
Cover image for Only adjacent elements collapse

Only adjacent elements collapse

9
Comments
1 min read
The bigger margin wins
Cover image for The bigger margin wins

The bigger margin wins

3
Comments
1 min read
Nesting doesn't prevent collapsing
Cover image for Nesting doesn't prevent collapsing

Nesting doesn't prevent collapsing

8
Comments
2 min read
Margins can collapse in the same direction
Cover image for Margins can collapse in the same direction

Margins can collapse in the same direction

9
Comments
1 min read
More than two margins can collapse
Cover image for More than two margins can collapse

More than two margins can collapse

3
Comments
1 min read
Negative margins
Cover image for Negative margins

Negative margins

5
Comments
1 min read
Multiple positive and negative margins
Cover image for Multiple positive and negative margins

Multiple positive and negative margins

4
Comments
1 min read