views:

44

answers:

1

I've got a class

    .text2{
    font-size: 1.2em;
    color: #473f37;
    padding-bottom: 0.3em;
    }

I want text of links to appear white within this class, how do I do it?

<div class="text2">
  <a href="notice">Notices</a>
</div>

I tried the below and it not working

.text2 a:link{
    color: white;
}
+4  A: 
.text2 a { color: #ffffff; }
Mark B
thanks but, don't I need the 'link' part below?text2 a:link { color: #ffffff; }anyway, with or without 'link', it's not working for me.
conspirisi
No, unless you were specifying a separate colour for the different link states; then you'd need a rule for a:link, a:hover, a:visited and a:active. The fact that it's not working sounds like a specificity issue to me - think about where else in your CSS you are specifying link colours (which could be overriding it).
Mark B
thanks your're right
conspirisi