Forum Moderators: not2easy
#container a:link{
color: red;
}
<!-- not sure if the following is correct? -->
a.greenLink{
color: green;
}
.
.
.
.
Body
======
<div id="container">
<a href="#">This is a red link</a>
// I'd like a green link here....
</div>
What's the correct syntax to accomplish this? I've looked around the internet a few hours and couldn't find anything. I've tried things like a.greenLink, but this doesn't cover the visited, hover and active states. I've tried #container a.greenLink and that doesn't work. I guess I could just create a new Div and nest that within #container, but I don't want to get in the practice of hacking my way around the problem. I'd like to know the proper way to apply link color to a class and be able to use the most specification possible.
Thanks