This forum is now read-only. Please use our new forums! Go to forums
Why didn't my links changed when clicked, hovered?
here is my code.
a:link{
color:#008B45;
text-decoration: none;
}
a:hover{
color:#00FF00;
}
a:visited{
color:#EE9A00;
}
and here is my html code
<!DOCTYPE html>
<html>
<head>
<link type="text/css" rel="stylesheet" href="stylesheet.css"/>
<title></title>
</head>
<body>
<div>
<p><a href="https://www.google.com.ph/?gfe_rd=cr&ei=uxu7VZy4PITI8AfVp7X4Ag&gws_rd=ssl">Google</a></p>
<p><a href="https://www.facebook.com/?stype=lo&jlou=Afeqfd_rElAMOEkovwl3eM0I5gdYu-7nXarJXIbY_uWLe3Pp7ObIXRYYDCQqE2kX_DrEKFpt85iiYXU9cMUr2Fhs&smuh=45601&lh=Ac9J9lTKem4LjSqS">Facebook</a></p>
<p><a href="https://www.youtube.com/">YouTube</a></p>
</div>
</body>
</html>
Answer 55bd41249113cb45200001f3
from http://www.w3schools.com/css/css_link.asp :
When setting the style for several link states, there are some order rules:
a:hover MUST come after a:link and a:visited a:active MUST come after a:hover
are you sure the links don’t look visited simply because you visited them? maybe try new urls?
anyway, i still can’t get past this exercise. i pasted your code and it still tells me the a:link color isn’t set.
Answer 55ba0ab8937676a9f50000fd
Hi Johns,
mhhh…. the CSS part looks fine. Can you show us your HTML code?
Regards, Kevin
1 comments
i moved the a:visited to the top like i have below. that allowed me to see the hover color change but it was like all of the links had been clicked. a:visited { color:#ee9a00; } a:link { text-decoration: none; color:#008b45; } a:hover { color:#00ff00; }
Answer 55bc122ed3292f601d000070
i moved the a:visited to the top like i have below. that allowed me to see the hover color change but it was like all of the links had been clicked. The course says i got it correct. a:visited { color:#ee9a00; } a:link { text-decoration: none; color:#008b45; } a:hover { color:#00ff00; }
Popular free courses
- Free Course
Learn SQL
In this SQL course, you'll learn how to manage large datasets and analyze real data using the standard data management language.Beginner friendly,4 LessonsLanguage Fluency - Free Course
Learn JavaScript
Learn how to use JavaScript — a powerful and flexible programming language for adding website interactivity.Beginner friendly,11 LessonsLanguage Fluency - Free Course
Learn HTML
Start at the beginning by learning HTML basics — an important foundation for building and editing web pages.Beginner friendly,6 LessonsLanguage Fluency
1 comments
thanks. You’re a very resourceful person, hope we can help other more in the future.