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!
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
Brandon Brigham3,716 Points
How to make left sidebar menu items a specific color when clicked
Please take a look at the site I'm working on:
You will see there is a menu bar on the left hand side of the page. When you click a section I want that specific menu item to change to a light green color, otherwise I want them to be black as they are.
Can't seem to figure this out. Please help! Thanks!
Kevin Matsuo36,064 Points
on line 279 of index.html remove the classname 'active' from the class.
line 279: <li class="menu-item active">
this is a css answer to your question, which was posted in the css community. however Ashish is correct in that this site was built with the intention of using jQuery to add and remove the classname to the list items. the classname 'active' is dependent upon css and jQuery, in that once the classname 'active' is added, the color of the list item will remain a green color, which is preferred for UI purposes so that the user can see where on the page they are currently looking at.