Thanks for the suggestion. I had considered using an expression under IE, however, according to this MSDN post, expressions are no longer supported by IE8 in standards mode: http://blogs.msdn.com/ie/archive/2008/10/16/ending-expressions.aspx
But to further your idea, the CSSResource in GWT2 allows conditional CSS which would make it more straightforward to target individual browsers instead of relying on a * html rule to be ignored: http://code.google.com/p/google-web-toolkit/wiki/CssResource#Conditional_CSS On Oct 24, 9:00 am, Mohamed Mansour <m0.interact...@gmail.com> wrote: > You would have to use some CSS tricks to make that work. > > * html div.someclass { width: expression( document.body.clientWidth > > 49 ? "50px" : "auto" );} > div.someclass { max-width: 50px; } > > You would have to include them both. The "* html" will only target IE > browsers, while the original one targeting all others. > > On Oct 23, 6:22 pm, Bryan <bryan.verg...@gmail.com> wrote: > > > I have a standards mode GWT app, GWT2.0 m2, and the following CSS > > rule. > > > .mylabel { > > max-width:50px; > > overflow:hidden; > > > } > > > This works properly in all browsers except (of course) IE, where the > > label width is not actually constrained by max-width. This is IE8, > > btw. > > > Is there any workaround other than calling Element.getOffsetWidth() > > at runtime and applying a limiting width style if the label is too > > wide ? > > > (I though that GWT was supposed to work around these browser > > differences automatically). > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-toolkit@googlegroups.com To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en -~----------~----~----~----~------~----~------~--~---