CSS Hover color

a:hover { color: #000; }

CatPhotoApp

what’s wrong with this code?

1 Like

Your syntax is absolutely fine. Can you send full CSS code to analyze what’s wrong with it?

1 Like

The code editor has a CSS rule to style all a tags black. Add a rule so that when the user hovers over the a tag, the color is blue.
THIS IS THE QUESTION

1 Like

It seems like you have the wrong color?

a:hover { color: blue; }

Is this the problem?

1 Like

Hi

a:hover { color: #000; } this will turn color black on hover - #000 is black.
So your code probably is changing text from black to black, not blue.

Because your code is not formatted for markdown we cannot see most of it. Your <a> tag appears as a link to a cat photo. You can wrap code in backticks or select the code button </> in toolbar above to format as computer code.

Here is the code editor for that challenge formatted as code.

<style>
  a {
    color: #000;
  }

</style>
<a href="http://freecatphotoapp.com/" target="_blank">CatPhotoApp</a>

Including the link to the challenge helps immensely when asking for assistance.
Here is the link to the challenge

I believe that if you use the ‘ask for help’ button on the challenge page most of this will done for you automatically. A topic will be opened in the correct forum with the link to your challenge included.
image

2 Likes

it’s still doesn’t work. It says this;
The anchor tag should have a color of blue on hover.

1 Like

Can you copy and paste your entire solution so that everyone can see it? Be sure to format it as computer code or we won’t be able to see most of it

1 Like

Thank you. I got fix it

Result.

CatPhotoApp

cat photos

I put the same code the guy in the top did

1 Like

Alphaleo, Yes, thank you so much.

I’ve actually got the answer,

It asked me to put the both black and blue, but I missed that I gotta put the hover different place,
The answer is this:
a {
color: #000;
a:hover {
color: blue;
}
}

2 Likes

this is my answer
a {
color: #000;
}
a:hover {
color: blue;
}

Hi @jegloboi !

Welcome to the forum!

This thread has not been active for over 3 years.
Please participate in newer threads.
I am going to close it.

Thanks!