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!

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


nav is lower on contact page than on index

Hi treehouse community. New on the site, and new to coding. I have been working on a simple test webpage to test out what ive learned so far. My first bug that i havent been able to find is that my entire header and nav seems one line lower on the contact page compared to the (empty) about and home pages.

By displaying source i cant see any <br> or unwanted whitespace that could accounts for the space, but then again im new.

External link: http://www.casaberger.com/test

1 Answer

Jeff Lemay
Jeff Lemay
14,268 Points

The float property can be a little tricky to get a grasp of. You have your header element floated left, which takes it out of the normal flow of the page. Because of this, your #contactForm is "starting" at the top of the page.

You can either add clear:both to the #contactForm or, as I would suggest, remove the float property from your header element.

Thank you, that fixed it. Im still struggling with the float (and block inline), thank you for the help