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.

CSS How to Make a Website Adding Pages to a Website Add a New Page

Bobby Stanton
Bobby Stanton
5,776 Points

Nav items: "Home" will go white to dark; but won't stay dark when on page; "About" stays dark all the time. Suggestions?

The nav bar was working fine, but then I started playing around with it and other aspects of the site to change it to a different concept. Somehow, I messed up the nav bar. If I hover over "Home," it will turn from white to dark. If I click on it, it goes to the page, but returns to white, so it makes it appear that I'm not on the Home page. The nav item, "About" stays dark all the time, no matter if I hover, am on the page, or off of it. https://w.trhou.se/7qp9nhjneu

2 Answers

Ryan Field
PLUS
Ryan Field
Courses Plus Student 21,240 Points

Hi, Bobby. It looks like the about page has the class selected on both your index and about pages, which is why the about link is always dark. You'll have to move the selected class to the index link on the index page.

Bobby Stanton
Bobby Stanton
5,776 Points

Like a charm, Ryan! thank you. Nick keeps telling me in the videos to "play around with the code." I listen and I get myself into trouble!! Ha! Seriously, thanks very much. Bobby