1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    CSS Margins Collapse

    Chris BiscardiChris Biscardi
    cssCSS

    When stacking multiple HTML elements with margins, those margins collapse into each other which can lead to surprising behavior if you're not expecting that.

    Code

    Code

    Become a Member to view code

    You must be a Member to view code

    Access all courses and lessons, track your progress, gain confidence and expertise.

    Become a Member
    and unlock code for this lesson
    Discuss

    Discuss