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

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

Only vertical margins collapse

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

Only adjacent elements collapse

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

The bigger margin wins

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

Nesting doesn't prevent collapsing

Reactions 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

Reactions 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

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

Negative margins

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

Multiple positive and negative margins

Reactions 4 Comments
1 min read