Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

CSS CSS Layout Basics CSS Layout Project Creating and Styling the Layout Containers

nicolaslemaire
nicolaslemaire
12,806 Points

Comment about the "nav" bar"

It's a comment, not a question actually. Guys at the teaching team, you should be more careful on some specific points. I've tried to figure out the "issue" for like, 25 mins, thinking I had it wrong, that some "margin was collapsing" or something like that, when in truth, it's just a mistake in YOUR code. Indeed, at the end of the video: https://teamtreehouse.com/library/css-layout-basics/css-layout-project/adding-media-queries-for-large-screens#

as you can see, after having entered the code: .name { float: left; } and .main-nav { float: right), well, the nav bar disappeared... I've tried numerous times to figure things out, I couldn't, so I watched the video to get the correct answer being quite disappointed 'coz I thought I had nailed it... and well, actually, at the end of the video, we can see that the nav bar is no longer there for Guil eitherl!!

The issue? that's a dummy mistake guys at the "teaching team", the font-color is set to a "lightblue" value, that's why it disappeared from the screen, fellow students, set it back to "white" like I did in the CSS file, and all of a sudden, your coding happens to be perfectly fine :) too bad I lost 30 mins on that one....

So Guil and the rest of the crew, please change the font-color of the "nav a" selector so that students don't have to do like me, and scratch their head for like 30 mins trying to understand what I couldn't get right in my head.

Hope that helps everyone, take care.

2 Answers

Guil Hernandez
STAFF
Guil Hernandez
Treehouse Teacher

Hi nicolaslemaire,

This wasn't a mistake--it's the natural behavior of floats. The header's height collapsed because of the floated .name and .main-nav elements inside it. In the next video, I mention the issue and show you how to fix it.

Hope this helps. :)

Guil

Michael Walker
Michael Walker
45,428 Points

Thanks Guil,

I was just about to post something similar. I wish the newbies of the website would do more research before blasting the Treehouse team. You guys are great!

nicolaslemaire
nicolaslemaire
12,806 Points

My bad Guil and Michael ;) It's just that after changing the font-color I was happy because it was not a coding error I had made in the first place but I will be careful next time. And incidentally, Guil does know (in private) I don't blast any member of this awesome team, rest assured about this, Michael. Take care fellows.