0

I have this character code <span class="psi">&#936;</span> for a psi greek character.

This is the css code for

.psi{
color:red !important;
}

the class psi.When i try the code out in my firefox web browser,the character is not red. Why is this?.

4
  • 3
    Works for me. jsfiddle.net/8svwe5up Commented Jan 22, 2015 at 12:14
  • Ditto - jsfiddle.net/jgkv9b9q/1 in FF35 & Chrome Commented Jan 22, 2015 at 12:15
  • What version of Firefox do you have? I believe the latest is 35.0. On another note, does it have the same effect in other web browsers (Chrome, Safari, IE)? Commented Jan 22, 2015 at 12:17
  • The class was being overridden by another.Apologies. Commented Jan 22, 2015 at 12:23

2 Answers 2

3

That can happen only if you have another rule (more specific) with !important that also applies to that element.

For example

#wrapper span{
    color:blue !important;
}
.psi {
    color:red !important;
    font-size:3rem;
}
<div id="wrapper">
    <span class="psi">&#936;</span>
</div>

So check for overlapping rules.
(and try to not use !important. You should be able to do what you want by using more specific css rules)

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

Comments

0

You cannot change the color of some html entities in Firefox (at least up to 60.0b8). Some examples are ❓ and 📖:

.psi{
  color:blue !important;
}
<span class="psi">&#10067;</span>

It works in Chrome.

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.