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 How to Make a Website Styling Web Pages and Navigation Build Navigation with Unordered Lists

Anthony Birch
Anthony Birch
1,845 Points

Looks like this part of the course needs extra code?

I could not get rid of the white space at the top, so I downloaded the files for this step and inserted them into my workspace. Still had the white space at top. Then I inserted:

body{ float: left; margin: 0; padding: 0; width: 100%; }

Another poster suggested this. It worked. When I comment this code out, the white space returns. I am using Chrome.

1 Answer

Jonathan Grieve
MOD
Jonathan Grieve
Treehouse Moderator 91,253 Points

It does seem odd, especially as I've taken this course and always been able to remove the whitespace.

My thought would be the check the display properties of your elements as root block level always will always leave line breaks.

Check that your header selector has an inline-block to it

Also to get into it further you can use the Chrome DevTools in your browser to seek out and kill the extra padding and margins that might be causing the whitespace to appear.

Good luck. :-)