Special Behavior of Margins

In this lesson, we will explore some special kinds of behavior of the margin property. Let's begin!

CSS has a feature called collapsing margins where two separate margins become a single margin.

Listing 10-7 shows two situations when this phenomenon occurs.

Get hands-on with 1200+ tech skills courses.