This forum is now read-only. Please use our new forums! Go to forums

0 points
Submitted by Leslie
over 8 years

15/23 Pseudo Class Selectors: a:visited not working

When you click on any of the links it does not show that it’s been visited. I’ve tried switching the ordering of the pseudo elements in the CSS and nothing is working.

Here’s my code:

HTML

<!DOCTYPE html>
<html>
    <head>
    <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
    <title></title>
</head>
<body>
    <div>
      <a href="https://www.pbs.org">PBS</a>
      <a href="https://www.yahoo.com">Yahoo</a>
      <a href="https://www.mozilla.org">Mozilla</a>  
        </div>
    </body>
</html>

CSS

a:link {
 text-decoration: none; 
 color: #008b45;      
}

a:visited {
 color: #ee9a00;
}

a:hover {  
 color: #00ff00;   
}

Answer 55d57ad89113cb994700043c

1 vote

Permalink

Try a google search css :visited not working site:stackoverflow.com as there are Browser specific problems…

points
Submitted by Leon
over 8 years

5 comments

Leslie over 8 years

Thanks

Leslie over 8 years

You’re right about it being browser specific.

jstrang over 8 years

Thanks for your comment. Huge help it was.

fmd123 over 8 years

This was exactly my problem! Thanks! I’m using Safari and the color change for visited links doesn’t happen. Fortunately I don’t get an error message and I’m allowed to move forward to next exercise.

Leon over 8 years

@fmd123, see separate post…

Answer 55e007a6b625489dac000212

1 vote

Permalink

points
Submitted by Leon
over 8 years

Answer 55dd6e6b51b88721dd00004f

0 votes

Permalink

it worked try it

<style>
    a:link
    {
        text-decoration: none; 
        color: #008b45;  
    }
    a:hover
    {
        
        color: #00FF00; 
    }
    a:visited
    {
        color:#EE9A00;
    }
    </style>
    <title></title>
</head>
<body>
    <div>
        <a href="https://www.pbs.org">PBS</a>
        <a href="https://www.yahoo.com">Yahoo</a>
        <a href="https://www.mozilla.org">Mozilla</a>  
    </div>
points
Submitted by hepsiela
over 8 years

Answer 55e0089b9376760bf400030f

0 votes

Permalink

++ general search Did you try… http://www.codecademy.com/guidance/choose

google search == the Book == jquery [your question] site:developer.mozilla.org CSS [your question] site:developer.mozilla.org javascript [your question] site:developer.mozilla.org [your question] site:jquery.com [your question] site:getbootstrap.com

== discussions / opinions == jquery [your question] site:stackoverflow.com CSS [your question] site:stackoverflow.com javascript [your question] site:stackoverflow.com

== guidance == www.crockford.com [your question] site:crockford.com

http://stackoverflow.com/questions/1795438/load-and-execution-sequence-of-a-web-page https://learn.jquery.com/events/event-delegation/

https://developer.mozilla.org/en-US/Learn/HTML/HTML_tags https://developer.mozilla.org/en-US/docs/Web/CSS/Reference https://developer.mozilla.org/en-US/docs/Web/CSS/Specificity https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes http://www.w3schools.com/jquery/jquery_ref_selectors.asp

points
Submitted by Leon
over 8 years

Answer 55e3942fd3292fdccf000539

0 votes

Permalink

@fmd123, under certain circumstances you can shoot your Browser in an inconsistent state.

Therefor it is of an advantage to know that you have 2 reset facilities:

One is the use of the F5-key which does a refresh Browser

and

Two, select&copy your code Then use the Reset Code button of the course-window, then paste your code back in.

Addendum from Tony de araujo General Notes: Always refresh the browser after making corrections: CTRL f5 ( if on Windows or Linux) CMD r ( if on a MAC).

points
Submitted by Leon
over 8 years

1 comments

fmd123 over 8 years

Ok… so I take it that it should have worked with Safari and if I refresh browser etc. then I can get it to work? I recall I did do some of excising and moving around to get the correct sequence.