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 CSS Basics (2014) Basic Selectors Pseudo-Classes

Adam Oliver
Adam Oliver
8,214 Points

a:link problem

a:link {
  color: orange;
}

Applied the above to my stylesheet - on the new workspace and it does turn orange, but doesn't change color when visited. Even after applying

a:visited {
  color: lightblue;
}

I'm on Firefox.

7 Answers

adamdonatello
adamdonatello
27,485 Points

I've just tested it in Chrome and it works fine, so i think you are right about Firefox.

Adam Oliver
Adam Oliver
8,214 Points

Ah ok. Thank you.

adamdonatello
adamdonatello
27,485 Points

Your code should work fine in production. It might just be a bug with workspaces on Firefox.

adamdonatello
adamdonatello
27,485 Points

Hi Adam,

In what order are you applying your styles?

a:link { color: red; }
a:visited { color: blue; }
a:hover { color: yellow; }
a:active { color: lime; }
Adam Oliver
Adam Oliver
8,214 Points

a.link first, then a.visited after. It's weird - not sure if it's to do with Firefox because even without the a.visited, the color doesnt change to the browsers default after clicking, and it does have a href.

Simon Evans
Simon Evans
1,356 Points

Try writing your code in notepad or equivalent on a mac and view in Firefox to test. This should show whether its a browser issue.

i have the same problem...i also made this in notepad++ and opened it with google chrome,opera and interenet explorer! but nothing happenes!

sarahd0183
PLUS
sarahd0183
Courses Plus Student 3,167 Points

Must be a browser issue. I was also using Firefox (Version 46.0.1) when the malfunction occurred. Then I switched to Microsoft Edge (for Windows 10) and now it's working.