Why is the color for a:link overriding the color for a.cssbtn? Why is it only doing it sometimes?
[CODE]<style type=”text/css”>
a.cssbtn, a.cssbtn:visited {color:blue; }
a.cssbtn:hover {color:red; cursor:hand; }
a {text-decoration: none;}
a:link{color:#a62c3c}
a:active {color:#a62c3c}
a:visited {color:#a62c3c}
a:hover {color: #143974}
</style>
…
<body>
<div align=right>
<a class=”cssbtn” href=”javascript:navAnsClient(‘-1’)”><<Previous</a>
<a class=”cssbtn” href=”javascript:window.print()”>Print</a>
<a class=”cssbtn” href=”javascript:window.close()”>Close window</a>
<a class=”cssbtn” href=”javascript:openHelpDoc(‘BkgrdInfo’)”>Background</a>
<a class=”cssbtn” href=”javascript:openHelpDoc(‘Definitions’)”>Definitions</a>
<a class=”cssbtn” href=”javascript:navAnsClient(‘1’)”>Next Question>></a>
</div>
</body>
I recently changed the color of a.cssbtn to “blue”, expecting to change the color of all the links shown. But only the third one (Close Window) changed colors. The other four retained their old color, which is defined in a:link. If I change a:link’s color attribute to “blue”, then all the links except Close Window change color.
I have two questions about that. 1) Why didn’t all of the anchors change? They are all defined to the same class? 2) Why is a:link taking precedence of a.cssbtn? If I understand correctly, a.cssbtn is more specific and should take precedence.
Thanks much for your help.
-Jeff