Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML Responsive Layout

Jen Haga
Jen Haga
6,416 Points

Project 2: Responsive Layout, anchor elements

All seems to be going well so far in my work on Project 2. I added anchor elements so that the nav bar at the top will take the visitor to the desired section. I also added "Back to Top" and that is working fine. When I click "PORTFOLIO" on the nav bar, I'm taken to the top of the portfolio as expected. But when I click on "SKILLS" OR "CONTACT" on the nav bar, I'm not taken to the TOP of those sections. Is that related to the amount of content in those sections (just a few lines)? How do I make the nav link take me to the top of those sections?

Seth Kroger
Seth Kroger
56,403 Points

Are these all sections on the same page? If they are small sections at the bottom of the page, then yes it can be because of that. You can't scroll lower than the end of the page at the bottom of the window. If the top of the sections are less than a window-full from the bottom, the browser will scroll as far as it can and stop.