🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Kirt Perez
    Kirt Perez
    7,374 Points

    I still don't understand what's being said here

    Posted October 21, 2020 8:36am by Kirt Perez
    Kirt Perez
    7,374 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    1 Answer

  • ja5on
    ja5on
    10,338 Points

    Different browsers and different effects and different css pages.

    Posted July 12, 2020 11:15am by ja5on
    ja5on
    10,338 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    1 Answer

  • Chantal Baxter
    Chantal Baxter
    2,003 Points

    Navigation not showing in Workspace

    Posted April 27, 2020 5:40am by Chantal Baxter
    Chantal Baxter
    2,003 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    1 Answer

  • Changjoon Song
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Changjoon Song
    Python Web Development Techdegree Student 8,092 Points

    I'm not seeing /*---- Layout Containers ----*/ on my Workspace..

    Posted July 7, 2019 10:59pm by Changjoon Song
    .a{fill-rule:evenodd;}techdegree
    Changjoon Song
    Python Web Development Techdegree Student 8,092 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • Victor Mercier
    Victor Mercier
    14,667 Points

    Vertical Margin Collapsing

    Posted May 20, 2019 2:37pm by Victor Mercier
    Victor Mercier
    14,667 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    1 Answer

  • vamosrope14
    vamosrope14
    14,932 Points

    Should the heading margin be interfering with the bottom margin edge of the body?

    Posted May 14, 2019 2:17pm by vamosrope14
    vamosrope14
    14,932 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    1 Answer

  • vamosrope14
    vamosrope14
    14,932 Points

    So do some block elements come predefined with certain margins and paddings already applied to them?

    Posted May 13, 2019 6:55pm by vamosrope14
    vamosrope14
    14,932 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • kevin hudson
    PLUS
    kevin hudson
    Courses Plus Student 11,987 Points

    Does anyone have issues with the workspace not loading for them?

    Posted December 19, 2018 9:34pm by kevin hudson
    kevin hudson
    Courses Plus Student 11,987 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    1 Answer

  • Peter Retvari
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Peter Retvari
    Full Stack JavaScript Techdegree Student 8,392 Points

    Tested the DIV margin collapse at the end

    Posted September 3, 2018 9:07am by Peter Retvari
    .a{fill-rule:evenodd;}techdegree
    Peter Retvari
    Full Stack JavaScript Techdegree Student 8,392 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    1 Answer

  • Erick Martinez
    Erick Martinez
    2,894 Points

    I had to get rid of margin: 0.67em 0; in normalize.css in to get rid of the top margin in h1

    Posted May 29, 2018 4:37am by Erick Martinez
    Erick Martinez
    2,894 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    4 Answers

  • Luqman Shah
    Luqman Shah
    3,016 Points

    Ok so let me get this straight... "Why vertical margins collapse"

    Posted November 30, 2017 11:19pm by Luqman Shah
    Luqman Shah
    3,016 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    1 Answer

  • Saqib Ishfaq
    Saqib Ishfaq
    13,912 Points

    why can't i just set the margin:0; instead of adding padding in header then setting the margin to 0 again?

    Posted November 2, 2017 1:49pm by Saqib Ishfaq
    Saqib Ishfaq
    13,912 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • mohamedhalabi
    mohamedhalabi
    1,968 Points

    long story short- Please correct me if im wrong !

    Posted September 26, 2017 7:58am by mohamedhalabi
    mohamedhalabi
    1,968 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • Aakash Srivastav
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Aakash Srivastav
    Full Stack JavaScript Techdegree Student 11,638 Points

    h1 default margin

    Posted September 24, 2017 6:40am by Aakash Srivastav
    .a{fill-rule:evenodd;}techdegree
    Aakash Srivastav
    Full Stack JavaScript Techdegree Student 11,638 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • J Tan
    J Tan
    11,847 Points

    Why adding padding to only .main-header fixes collapse?

    Posted July 29, 2017 6:41pm by J Tan
    J Tan
    11,847 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    1 Answer

  • jlampstack
    jlampstack
    23,932 Points

    Why would normalize add a margin to h1 in the first place?

    Posted July 2, 2017 1:46pm by jlampstack
    jlampstack
    23,932 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • Katsumi Suno
    Katsumi Suno
    4,194 Points

    Is there a logical reason behind collapsing margins?

    Posted June 29, 2017 3:35pm by Katsumi Suno
    Katsumi Suno
    4,194 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • Bei Zhang
    PLUS
    Bei Zhang
    Courses Plus Student 7,113 Points

    i checked the vertical elements, there is no larger part can collapse. could you kindly help me to check?

    Posted April 20, 2017 10:00am by Bei Zhang
    Bei Zhang
    Courses Plus Student 7,113 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    1 Answer

  • KT Lin
    KT Lin
    276 Points

    normalize.css v6.0.0 doesn't set body to margin 0, the method suggested to resolve Margin Collapsing doesn't work

    Posted April 4, 2017 3:24pm by KT Lin
    KT Lin
    276 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    0 Answers

  • Sage Savage
    seal-mask
    .a{fill-rule:evenodd;}techdegree
    Sage Savage
    Front End Web Development Techdegree Student 3,960 Points

    Header and Footer collapsing?

    Posted March 26, 2017 12:15am by Sage Savage
    .a{fill-rule:evenodd;}techdegree
    Sage Savage
    Front End Web Development Techdegree Student 3,960 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • nathanielcusano
    nathanielcusano
    9,808 Points

    Can't make heads or tails of what he's talking about. Is there a way he can point with a ruler at what he is referring?

    Posted March 2, 2017 3:03am by nathanielcusano
    nathanielcusano
    9,808 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • Joseph Carrillo
    Joseph Carrillo
    2,137 Points

    vertical margin preference?

    Posted February 27, 2017 5:51pm by Joseph Carrillo
    Joseph Carrillo
    2,137 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • Juan David Hernandez
    Juan David Hernandez
    7,415 Points

    Positive and negative margins

    Posted January 11, 2017 1:20am by Juan David Hernandez
    Juan David Hernandez
    7,415 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    1 Answer

  • Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points

    Different selectors to style h1. Any reason for that?

    Posted July 11, 2016 6:53am by Arikaturika Tumojenko
    Arikaturika Tumojenko
    8,897 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • abdirahman liban
    PLUS
    abdirahman liban
    Courses Plus Student 2,163 Points

    about vertical margin collapse

    Posted December 31, 2015 5:48pm by abdirahman liban
    abdirahman liban
    Courses Plus Student 2,163 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

  • abdirahman liban
    PLUS
    abdirahman liban
    Courses Plus Student 2,163 Points

    margin and padding confusion

    Posted December 31, 2015 5:44pm by abdirahman liban
    abdirahman liban
    Courses Plus Student 2,163 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    3 Answers

  • Dan Oswalt
    Dan Oswalt
    23,438 Points

    What is the purpose of collapsing vertical margins?

    Posted November 10, 2015 4:42pm by Dan Oswalt
    Dan Oswalt
    23,438 Points
    • CSS
    • CSS Layout Basics
    • Getting Started with CSS Layout
    • Why Vertical Margins Collapse

    2 Answers

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.