It is possible in straight javascript, but I don't think there's anything in GWT to help out. See http://developer.apple.com/internet/webcontent/styles.html for an example.
I used it a few years back for something really similar - changing the style of a bunch of elements by modifying a css rule. Definitely much faster than changing the styles on all those dom elements. If I recall, finding the right stylesheet and css rule is kind of a pain because there's no efficient lookup. I think I put the style that I wanted to modify right on the html page to make finding it easier. I bet GWT could do something to make referencing css rules in a CssResource efficient. On May 28, 11:39 am, fmod <[email protected]> wrote: > Hi, is there a way to change a CSS Property inside a Rule definition > on the fly. > > I have defined a rule > > .myRule { > height: 22px; > width: 100px; > overflow: hidden > > } > > I have hundreds of DIV elements with that rule. > I will like to change the width property directly on the rule. Without > iterating all the elements and > inlining the new width. > > Is that possible? > > Thank you -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
