The Rules of Margin Collapse09 Jan 2021
In CSS, adjacent margins can sometimes overlap. This is known as “margin collapse”, and it has a reputation for being quite dastardly.
A nice and clear explanation of how CSS margins collapse with interactive demos. Certainly calrified a few things for me!