Your 'tribute-link ’ id selector is the problem by looks of it. I have changed it to a:link and it seems to work.
I am a newbie, so I might not explain it correctly and someone might come along to correct me, however the way how I understand it is that ids have the highest priority. By giving ‘tribute-link’ an id selector, CSS will ignore the a:hover instruction for colour because it has lower priority. By removing higher priority selector and replacing it with a:link, CSS will change the colour of your text on hover because it is no longer overwritten by the first selector.
^Correct. That or the other way. Increase the specificity of the hover selector.
I will say unless the link style is supposed to be global for all links I would not suggest using an element selector and would use a class instead. I don’t suggest using ids for styling, they have too high specificity which can cause issues in the long run (for larger projects at least).
a {
/* global for all links */
text-decoration: none;
}
.tribute-link {
color: green;
}
.tribute-link:hover {
color: blue;
background: green;
}
@lasjorg@trix19
thanks. i guess that the only solution. the reason id is there because of the requirement of the challenge. I thought that would be the reason. I wonder if there is a way to ovewrite the priority of Id if i want the hover to work
At the top right corner of your editor, you have ‘Settings’. Change the ‘Editor layout’ from ‘Classic’ to 'Right results ’ and you will be able to see your last line.