A CSS tutorial explaining how collapsing margins work and how to deal with them, using a global reset of margin and padding, and changing how padding and border are calculated with box-sizing. It is aimed at people already learning CSS layout.
What you’ll learn
✓Explain when vertical margins collapse and how to avoid it
✓Apply a global reset of margin and padding
✓Use box-sizing to control how padding and border are calculated