Styling in GWT

From Zanecorpwiki

Jump to: navigation, search

You may think you can do something like element.setAttribute("style", "color: yellow") and for good browsers, you can. However, it won't work in IE, so you have to do:

element.getStyle().setColor("yellow");

and of course the same with other style attributes. This makes it a pain to set multiple styles all in one go, but there you go.

This is not a limitation of GWT, but a limitation of JavaScript on IE (at least through 7, not sure about 8).

Soo Styling via JavaScript for more details.

Personal tools