Welcome to the Treehouse Community
Looking to learn something new?
James Barrett13,253 Points
Why is there white space below my navigation (possible margin collapse)?
To avoid sending all my code over, I have taken a snapshot:
I am have completed this challenge however I am noticing white space below my navigation bar at the top. When I inspect it, no element is shown!
I believe this may have something to do with collapsing margins, however I am not sure how to fix it.
Kevin Korte28,109 Points
Your main container is completely collapsed because it only contains floating children. You were close, in that you added a clearfix class to the container div, but you didn't actually set the clearfix class to do anything in CSS.
If you deploy the clearfix css, it'll work fine. Right now it's the footer that is pushing up into this space, and the footer's margin is creating the white space.
Here is the clearfix hack: http://nicolasgallagher.com/micro-clearfix-hack/