This forum is now read-only. Please use our new forums at discuss.codecademy.com.

CSS Selectors Forum

View Course

450 points
D339fbc3f9e33fa0a89e21a5b794d8b8?s=140&d=retro
Submitted by
Muhammad Lee
about 2 years ago

15 lesson is broken

In 15 lesson links that I put aren't working properly. For example google.com and codecademy.com and vk.com does not work, but some other unvistied link works well.

If you know how to report a bug, please send this post.


0 votes

permalink

check here how to format your code. Your code is currently not visible. if you update your question please leave a comment so i get a notification.
If you put your code i a comment, i am going to ask you to redo it, and use proper format.

Can you provide some code? So i can check it, before i report. The visited compares to your browser history, not if you clicked that particular link on a particular page.

2937 points
593d545c83696644420003b7_64554016
Submitted by
stetim94
about 2 years ago


0 votes

permalink

<!DOCTYPE html>
<html>
    <head>
        <link type="text/css" rel="stylesheet" href="stylesheet.css"/>
        <title></title>
    </head>
    <body>
        <div>
            <a href="http://www.codecademy.com/">Codecademy Home</a>
            <a href="http://google.com/">Google</a>
            <a href="http://vk.com/">Vk</a>
             <a href="http://gkk.com/">Айнаш</a>
        </div>
    </body>
</html>




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

a:hover {
    color: black;
}

a:visited {
    color: #EE9A00;
}

450 points
D339fbc3f9e33fa0a89e21a5b794d8b8?s=140&d=retro
Submitted by
Muhammad Lee
about 2 years ago

4 Comments

D339fbc3f9e33fa0a89e21a5b794d8b8?s=140&d=retro Muhammad Lee about 2 years ago

below written in css file as it should be

D339fbc3f9e33fa0a89e21a5b794d8b8?s=140&d=retro Muhammad Lee about 2 years ago

only the gkk.com link works properly

593d545c83696644420003b7_64554016 stetim94 about 2 years ago

i would put a:hover before a:visited, so it hover also works on visited links. It works fine right? Of course you already visited google and codecademy, so they have the visited color, that make sense

D339fbc3f9e33fa0a89e21a5b794d8b8?s=140&d=retro Muhammad Lee about 2 years ago

Yes, it works now, i didn't know that order matters in css. Well then many student will have trouble with this lesson, since that order is written in intructor notes.


0 votes

permalink

I understand now. No where in the original question you mention hover not working. yes, the order is important. there is also a:active (which is used when link is pressed) it should be last (after a:hover). But that one is not covered here, well in the introduction they are put in the right order:

a:link: An unvisited link.
a:visited: A visited link.
a:hover: A link you're hovering your mouse over.

but then in the instructions they are a bit messed up, i can understand why that causes confusion.

2937 points
593d545c83696644420003b7_64554016
Submitted by
stetim94
about 2 years ago