In a special case (using myGwt components) and for a special component I needed to add an ID to the component and to specify the CSS by ID. In general it works well using addStyleName. But the styles available depends on the type of HTML component, I think the StackPanel is an HTML TABLE.
On May 19, 4:56 pm, Nick <powers.n...@gmail.com> wrote: > Add the style name instead (i.e. addStyleName("mstackpanel") and see > if that works for you. > -Nick > > On May 18, 9:24 pm, "Donald.W.Long" <donald.w.l...@thelongsfamily.com> > wrote: > > > Hi all, > > > I have been playing around with StackPanels and I wish to control the > > look of it. > > > I have tried using the normal CSS for StackPanel and nothing changes. > > > .gwt-StackPanel { > > background-color :#cff; > > > } > > > .gwt-StackPanel .gwt-StackPanelItem { > > > } > > > .gwt-StackPanel .gwt-StackPanelItem-selected { > > > } > > > .gwt-StackPanel .gwt-StackPanelContent { > > > } > > > You would thank that some sort of backgroup color would change, does > > not matter what I put in any of the above CSS for StackPanel, nothing > > changes. > > > I did do the following > > > .mstackpanel { > > background-color :#cff; > > > } > > > and then added > > > mystackpanel.setStyleName("mstackpanel"); > > > and that changes the backgroup, messes up all the other settings, that > > I do not know how to set. > > > I am a bit confused about how the CSS works in gerenal for GWT. > > > I thought if I replaced items like above in the correct CSS entry it > > would take affect. Is this not true? > > > All I wish to do is change the background color of a stack panel. > > > Any help would be nice. > > > Donald W. Long (donald.w.l...@thelongsfamily.com --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---