How to change the link color in a specific class for a div CSS

Anil Jain picture Anil Jain · Jun 1, 2012 · Viewed 190.1k times · Source

In my Page the following CSS is set:

a:link {
    color: #0094DE;
    text-decoration: none;


}
a:visited {
        text-decoration: none;
color: #0094DE;

}
a:hover {
text-decoration: underline;
color: #DD127B;

}

I want to Change the Link color inside a div which has a class assigned to it. I tried the following :

register:link{color:#FFFFFF;
        }

Where register is the name of the div in which i want to change the link color. How can i do that? Also how to change the color for hover link over the same div?

Answer

Shehzad Bilal picture Shehzad Bilal · Jun 1, 2012
.register a:link{
    color:#FFFFFF;
}