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 trialBrad Robb
Courses Plus Student 671 PointsI want to change the class of the selected navbar item to active. How would I do this with a general php header file?
I have multiple menu options on the navbar and I want to indicate which one is currently open by changing the class to active. How would I do this using a PHP file that is the same for all the pages? Is there a way to program PHP so that it changes the menu item class based off what page is open?
1 Answer
Mario Blokland
19,750 PointsHi Brad Robb, in a video a bit later Randy is going to show you how to do that.
Brad Robb
Courses Plus Student 671 PointsBrad Robb
Courses Plus Student 671 PointsThanks!
Mario Blokland
19,750 PointsMario Blokland
19,750 PointsYou are welcome