Welcome to the Treehouse Community
Looking to learn something new?
Kai-Ting Lin5,712 Points
Hello, I have a question about "collapse". I can't visualise it well. It comes from the explanation of "main-nav".
Before Gui adds a background white to it and give it float, he explains: "main nav ul element is still in the normal document flow but it appears collapsed at the top of our header, ". What does "collapse" mean in this context?
When all tags inside a tag are set to float, the external tag will act like it's empty, losing it's height, hence the white line he demonstrated. example:
<not floated><floated></floated></not floated>
Imagine the "floated" tag is floating above "not floated." Instead of stretching around and containing "floated," "not floated" won't see it up there and will instead collapse, or act like it's empty. The way they fix it in the video is floating "not floated" up to "floated", so they're both removed from document flow.