views:

55

answers:

1

I'm using following jQuery function to change the opacity of text (it's color: #999999)

$('.small_buttons').css('opacity', 0.3);

The effect looks good in Chrome or even Internet Explorer 8, but in current version of Firefox (3.6.10) this text gets really strange greenish colour, instead of nice pale gray.

Screenshots:

Chrome: http://imgur.com/eTlAg.png

Firefox: http://imgur.com/QAOF0.png

Help appreciated!

Update: example: http://jsfiddle.net/YnDFr/1/

+2  A: 

It appears it's because the element has no background, or specified as transparent. Try to add it the same background as its container.

MatTheCat
Yes, that works! After adding the #fff background-color it renders fine. Is it a known Firefox bug? In my case it's OK to add solid background to the container, but what if I wanted to render it in transparent div (and the image background would be from some element several level above in DOM tree)?
chodorowicz
and sorry, I cannot yet vote your answer up (because of my reputation) but I'll accept your answer later
chodorowicz