What is the difference between:
a.cvc-formsHelpText:hover {
text-decoration:none;
}
And:
.cvc-formsHelpText:hover {
text-decoration:none;
}
The HTML is:
<a class="cvc-formsHelpText" href="javascript: void(0)">
<img src="img.gif">
<span>Text.</span>
</a>
The first works and the second not, but both refer to <a> tag.
The problem, when you’re saying that the second doesn’t work, is that you’ve omitted a dot, as BoltClock points out:
.cvc-formsHelpTextAs for the difference between the two syntaxes, the former denotes that the element must be an anchor with the class
cvc-formsHelpText. The latter selector (provided that you include the dot that you’ve omitted) applies to any element with the classcvc-formsHelpText. Obviously, if only anchor elements contain that class, there will be no perceived difference in the way your website behaves.