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
Mona Jalal
4,302 Pointshow to highlight the nav menu bar when I go to the page?
so my website doesn't highlight the nav menu bar when I go to the page. How can I make that happen?
http://monajalal.github.io/education.html
Also here's the code: https://github.com/monajalal/monajalal.github.io
P.S.: It is a bootstrap4 based website. Not sure if I should have selected CSS as question category.
2 Answers
Sergey Podgornyy
20,660 PointsAdd class active to the specific elements, which you would like to highlight. If Bootstrap custom class is not enough for you, you can add new css rule to the specific item.
Mona Jalal
4,302 Pointsworked, thanks <a class="nav-item nav-link active page-item" href="projects.html">Projects</a>
jesseborden
11,623 Pointsjesseborden
11,623 PointsHi Mona,
Are you trying to highlight the nav link of the page that is currently loaded? If so, change the class "active page-item" to the corresponding a tag of your active page, and it should do the trick. Currently your first link "Mona Jalal" has that class on each page.