Link attributes within style

Im trying to get a style to have its own attributes for links but I cant seem to get it right,

.watermark {

color: #BF0F17;

}

.watermark a:visited {

color: #CC1111;

text-decoration: none;

}

.watermark a:hover {

color: #CD0C11;

text-decoration: underline;

}

.watermark a:active {

color: #CD0C11;

text-decoration: none;

}

What did I do wrong?

(Source)

#464885

hmm, are you sure that you are having it read right... also i doubt this will work but you can try putting a comma after .watermark. but i dont think that will work.

#464889

Are you sure that the 'a' tag is inside something with a class of 'watermark' ? Also, you never defined a rule for '.watermark a {}' , which means that the link will just be color #BF0F17 until you hover over it. If that's the case, then it's working exactly as you coded it, and the problem is a misunderstanding on your part ;).

It's my personal preference to, in most cases, be more specific in my rules. Instead of '.watermark a:hover', I would use 'div.watermark a:hover' (if it were a 'div' element, of course).

Hope this helps,

-NC

#464890

Thanks NC, I finally got it,

#464965