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 trialChristopher McCorkel
Courses Plus Student 1,265 PointsHeader structure of this page
Why is the main-nav div element not within the <header> structure of this page? As a beginner, that would make more sense to me.
2 Answers
Cameron Childres
11,820 PointsThere's no hard and fast rule that navigation has to be inside the header element. For this page, style.css adds some top padding to the header. Try putting the navigation div inside the header and preview the page to see why the choice was made to not include it in the header element.
Christopher McCorkel
Courses Plus Student 1,265 PointsI appreciate that. I just tried moving the .main-nav div into the header, which caused the div to move into an undesirable position in the viewport. I'm guessing that there is a styling conflict between the .main-nav and the header element, but I don't yet understand how to diagnose that.
Cameron Childres
11,820 PointsThat was me a couple days ago. Keep at it on the track and you will very soon :)