开发者

css javascript links

开发者 https://www.devze.com 2023-02-16 01:12 出处:网络
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>

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消