I'm not sure if Opera will allow the dynamic style changes you are trying to accomplish. IE and NS/MOZ Gecko allow this as you have witnessed, but I am not sure regarding Opera. There is still not full support for DOM.
Opera states that Version 6 is DOM compliant, and yes it is - the browser does recognise most of the DOM, though you can only READ the document, you can't WRITE to it using the DOM at the moment, consequently, you cannot alter CSS through the DOM.
Here is what Opera's TECH Specs [ [opera.com...] ]say on the subject:
cannot set the SRC attribute of iframes
We are currently working on DOM, based on the DOM 2.0 standard. We have also used some of Microsoft's extensions to DOM, notably the method for accessing CSS properties through a style attribute of the HTML elements. Modifying the document structure is not yet possible (ie. you cannot add or remove HTML elements). There are no plans to support Netscape's dynamic layers. Presently, we support getting and setting the following CSS attributes for absolutely positioned HTML elements:
color, background (only for setting of colors)
We support the following methods in the document object:
We support the following methods in HTML Elements: