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

0 points
Submitted by Christopher Nguyen
over 9 years

Show it if you know it!...Soln will not pass despite link color changes

My code is below, but it will not pass the exercise. The three links are colored differently. I have tested the CSS code by changing the colors to different values. How comes this code will not pass.

Here is the HTML code.

<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
        <title>Result</title>
    </head>
    <body>
        <!--Add your HTML below!-->
        <a href="msn.co">1</a>
        <a href="espn.co">2</a>
        <a href="real.co">3</a>
    </body>
</html>

Here is the CSS code:

/*Add your CSS below!*/
a:hover {
    text-decoration: none;
}
a:first-child {
    color: #CDB370;
}
a:nth-child(3){
    color: #FFC125;
}

Thank you in advance for helping me out.

Answer 551da50495e378084c000ab0

2 votes

Permalink

Passing Code(Chrome): a:hover { text-decoration: none; } a:first-child { color: #CDBE70; } a:nth-child(3){ color: #FFC125; }

points
Submitted by Sazha Vetruba
almost 9 years

Answer 54677607282ae3e524002141

0 votes

Permalink

What is the error it is giving you?

points
over 9 years

Answer 54679f36282ae32ac8002845

0 votes

Permalink

I just solved it. I was mixing up #CBD370 with #CBDE70. Thank you for your advice, can’t believe I didn’t see that.

points
Submitted by Christopher Nguyen
over 9 years

Answer 550081d486f552a453000888

0 votes

Permalink

I have the same code typed but it did not pass, then when I copied it from here it passed, I did that in IE and Chrome

points
about 9 years

2 comments

Douglas Brown almost 9 years

I have the same code and then replaced it with the code above pasted in. I get all 3 links have changed color, so it seems to be ignoring the “child” extender.

Douglas Brown almost 9 years

Note that the code passes the test but does not actually work