Be sure to check your html-element in some inspecting tool: Development Tools in Chrome, Firebug in FF. You might find out that your style-rule ("color: red;") gets applied but then gets overridden. (Meaning the element actually bears the class-name you added to it.) In that case you would see the rule listed but struckthrough: "color: red;".
If that is the case, you might still fix it without redefining standard.css. You can raise importance of your style-rule by addind "!important": "color: red !important;" or by writing more complex selector. Rules defined with selector "table tr td" have greater weight than those written with "td". On Wed, Jun 16, 2010 at 8:54 PM, Magnus <alpineblas...@googlemail.com>wrote: > Hi Sven, > > I think that's an issue for me. When I use addStyleName with padding/ > margin, it has no effect. I guess it's overwritten. However, copying > the standard.css sounds not nice to me. Isn't there another > (programmatical) solution? > > Magnus > > On Jun 16, 1:35 pm, Sven <sven.ti...@googlemail.com> wrote: > > Hi Magnus, > > > > > So what is the way one should use CSS? Is it possible to "inherit" a > > > style into another style, e. g. "my-button" inherits "gwt-Button", so > > > that I just add my adjustments? > > > > just try to use addStyleName() instead of setStylePrimaryName(). By > > this you preserve the default standard.css styling of your elements > > and you can add additional formatting. More specific, the button would > > still have the class gwt-Button followed by your specific class which > > you can add to any CSS file linked in the main page. > > > > However, as GWT adds its standard.css as last css file you may still > > experience strage overruling of your styles (using Firebug helps to > > understand what is overruled by what). > > > > If that standard.css overruling is an issue for you, my blog post > > "GWT's standard.css killed my page layout" may help you: > > > > > http://ililiililililii.blog.de/2010/05/12/gwt-s-standard-css-killed-m... > > > > Sven > > -- > 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-tool...@googlegroups.com. > To unsubscribe from this group, send email to > google-web-toolkit+unsubscr...@googlegroups.com<google-web-toolkit%2bunsubscr...@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- 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-tool...@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.