0

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 differance?

1
  • 1
    Use firebug. Or other similar tools, such as Chrome's Developer Tools. Even IE has something similar, I think you press F12 to get it. Commented Mar 11, 2011 at 13:16

4 Answers 4

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

@Lunar Don't use !important. Use the Chrome dev tools to find out which CSS rule is overwriting the .action rule's color property.
1

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 ?

Comments

0

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>

Comments

0

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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.