css javascript links
This should be very simple, but its not working!
I have this link on my page;
<a class='action' href='javascript:void(0)' OnClick='run()'> run </a>
And then this css
.action {
color: #e17009;
text-decoration: underline;
font-size: 80%;
}
For some reason it just shows up black, i can change the size etc.. but the colour doesnt work?
This link is generated with some jquery, and is refreshed, but don think that would make any开发者_StackOverflow differance?
Your color declaration is being ignored because of a previous directive, or overwritten by a later one. Try changing the selector to the more explicit a.action
or using color: #e17009 !important;
. If that doesn't work, view the parsed CSS values using Firebug.
Try refreshing your local css cache (CTRL+F5). If still not working, inspect your link with Firebug : what is css class making the link color black ?
I don't know why this is jQuery tagged, but your anchor should look like:
<a class='action' href='#' OnClick='run();return false;'> run </a>
I agree with Réjôme, use Firebug - I suspect that, following loading this css, you are loading another file that is overriding the anchor color. Firebug will make it clear where the color is coming from.
精彩评论