General Question

mirza's avatar

How to fix a CSS "opacity error" ?

Asked by mirza (5029 points ) November 18th, 2007

I am getting alot of “Property opacity doesn’t exist” error messages when trying to validate the css for this Site .Any idea how to fix this? More importantly does it even matter at all since the page renders fine in most browsers?

Observing members: 0 Composing members: 0

7 Answers

glial's avatar

It is mozilla specific. It isn’t really an error, just won’t validate.

segdeha's avatar

The opacity property also works in Safari, not just Mozilla/Firefox.

mirza's avatar

is there a hack of some kind to validate it ?

segdeha's avatar

I’m of the mind that validation is less important than meeting business requirements. Of course, if you have a biz requirement to use opacity and a biz requirement to validate, you’re screwed.

mirza's avatar

Ok i finally got it fixed. I don’t really know how, but theres an awesome free web tool called CleanCSS that magically fixes all your CSS errors. It is so freaking helpful

lapilofu's avatar

You might do a little reconsidering about what the purpose of validation is. It’s not an end in itself, and if your website functions perfectly without validating, and still has semantically meaningful markup, then validation is unnecessary. As Jeff Croft said, “Your markup validator, whether it’s the one on the W3C site or one built into your favorite coding tool, is a debugging tool [...] not a measuring stick for greatness.” I’m sure that you’ve heard about not fixing things that aren’t broken?

Your markup validator.

Or to cite an earlier article on a similar idea March to Your Own Standard

Also, there’s no way CleanCSS magically fixed your validation problem, unless it took the opacity declaration out. Check your code.

kullervo's avatar

Opacity is a CSS3 technique and so will not validate yet. It works in all major browsers apart from Internet Explorer where you have to use the alpha filter instead.
Some have used tricks to apply the opacity in a way that hides it from the validator but this is pointless. Opacity will eventually be accepted so you may as well use it.

Answer this question

Login

or

Join

to answer.

This question is in the General Section. Responses must be helpful and on-topic.

Your answer will be saved while you login or join.

Have a question? Ask Fluther!

What do you know more about?
or
Knowledge Networking @ Fluther