Dev.Opera - Follow the standards, break the rulesDev.Opera - Follow the standards, break the rules

Login

Lost password?

Forums » General Web Development Discussions

Discuss general web development related issues. For Opera bugs, use the Bug Report Wizard: https://bugs.opera.com/wizard/. For Opera feature requests and queries, use Desktop wish-list: http://my.opera.com/community/forums/forum.dml?id=24.

Note: You need to login to post in the forums. if you don't have an account you first need to sign up.

By JMJimmy anchor Monday, 15. June 2009, 04:09:13

avatar

Opera & IE Filters

Before I'm flamed horribly, I don't want Opera to support them! I hate them.

That said, I have a simple fade script that works in all browsers, except Opera.

I'd like to support it, however, I'm receiving the following error:

HTML style attribute
Declaration syntax error

Line 1:
ht: 200px; background-color: rgb(0,0,0); opacity: 0.0; filter: Alpha(Opacity=0);
--------------------------------------------------------------------------------^

It seems to be having a problem with:

div id="ji" style="position: static; width: 450px; height: 200px; background-color: rgb(0,0,0); opacity: 0.0; filter: Alpha(Opacity=0);">/div>

The page has a strict HTML 4.01 DTD, it validates without warnings.

I'm at a loss. If I take out filter: Alpha(Opacity=0); the error goes away. This of course means that IE is no longer supported. I suspect that Opera is going against the standard to ignore unknown attributes, but can't be sure.

Any ideas?

JMJimmy

By andreasbovens O anchor Monday, 15. June 2009, 22:51:54

avatarHi JMJimmy,

Alpha(Opacity=0) is indeed an IE only feature and will throw an error in the console. However, you can use the opacity property for other browsers. Check http://dev.opera.com/articles/view/css-and-opacity-methods-for-creating-tr/ for a detailed explanation of how to do this.

Moderators: pepelsbey | dstorey | mcx | operadev | chrismills | shwetankdixit | brucelawson | iheni | andreasbovens | zibin | mollydotcom