15. Links (need help)


#1

This is my HTML:

This is my CSS
a:link {
text-decoration: none;
color: #008b45;
}
a:hover {
color: #00ff00;
}
a:visited {
color: #ee9a00;
}

Everything is fine, except when I finished this part, it keep telling "Make sure you put some text between " pls guys help me


#2

Hello.
I think your code looks good. Your HTML is fine. Try to refresh that website or make your code "design" look different:
You ahould add your <li> tag right next to the <a> tag. (This is how it should look like <li><a href"">Text</a></li>
Sometimes your code is OK, but Codecademy cannot read it so it says that it's not correct.
Hope this helps!
Code!


#3

The only error I see is that your first link tag is not closed properly. It should be </a> instead of <a/>.


#4

I had the same problem as you but just figured it out. You have to take out the / at the end of your a href code line.


#5

On this topic. Everything works fine but my text doesnt change the color on hover....

I have checked my html and css they seems to be correct. Just to check I added font-weight: bold; and it works but not the color.

Here is my CSS:

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

a:hover
{
color: #00FF00;
font-weight: bold;
}

a:visited
{
color:#EE9A00;
}


#6

if you wanted hover to work on visited links, you should place it after visited:

a:visited
{
    color:#EE9A00;
}
a:hover
{
    color: #00FF00;
    font-weight: bold;
}

now it should work


#7

Lovely!!! Thanks stetim94 :smile:


#8

css uses a point system, to decide which selector should be applied in case of a conflicting property (in this case color) since (in your case) both css selectors (a:hover and a:visited) have the same amount of points, the order is used, later propertys overwrite earlier propertys