Problem with CSS selector
I have a link <a href="..." class="fancylink">text</a>
I used the code
.fancy
{
text-decoration:none;
}
but it still underlined, if I set开发者_如何转开发 it to "underlined" it double underline it.
So I can't take control of a link style using a Class?
Looks like you are having border bottom there, try this:
.fancy
{
text-decoration:none;
border:none;
}
Now apply that class to your link:
<a href="whatever" class="fancy">Link</a>
Edit:
Since you have updated your question. You have defined style fancy
but you are applying class fancylink
to link which is wrong, use the same class name in the link too, that is fancy
.
If it gets "double underline", it means you have a bottom border.
Use a tool like FireBug to figure out the style exactly, it is also possible you'd have a stronger selector hiding the new rule.
I can almost bet that the issue is "the cascade". I recommend using Firebug to debug your css.
http://getfirebug.com/
Also, if you have IE8 installed the developer tools are good too.
You link sets a class of fancylink
and your css defines a class call fancy
.
Make them both the same and you'll be in business.
精彩评论