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

mrx3
mrx3
8,742 Points

Having some trouble with my vertical navigation bar, and I could use some help please. (codepen included).

I wanted to make a vertical navigation bar for my practice site. All the links are colored black if they have not been visited by the user yet. Now when I click just one link, all the sudden all the links turn purple even though I have not click them. This only happens in Chrome,Firefox, and not in IE. Can someone explain to why this is happening, and how to fix it? The CSS starts on line 73 and goes until 113.

Thank in advance for any help with conundrum I seem to be having :D codepen : http://codepen.io/mike316/pen/KweEbJ

1 Answer

Colin Marshall
Colin Marshall
32,861 Points

It is doing this because all your navigation options link to #. So once you click on one of the links, you have "visited" all of them. If you change the links to #home, #about, and #contact (or anything so they are different from each other) it will only apply the visited styles to the link you click on.

mrx3
mrx3
8,742 Points

Thank you for the help Colin.