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 highlight the nav button that is clicked on?

I know how to highlight a nav button with separate pages. Now the pages appear by scrolling down. How is it done here? I couldn't find the right info after youtube and googling.

https://w.trhou.se/e69equwd88

2 Answers

As far as I understand your situation you just need add class = selected like this.

<li><a href="index.html" class="selected">Home</a></li>

hope this help.

That works for separate pages. Only now it's a bit different. Everything is on one page, but still with a nav to navigate on this page. Now I don't know how to set the navigation up so it directs to different part of the page.