hi,

might I suggest you take a look at this in firebug (or chrome's debug
console). It should allow you to see if the css has been loaded. If it has
not, then there is no style to apply (the browser does not consider this to
be an error).

on the other hand, I think client bundles now have the ablity to check that
the css has in fact been loaded. The same mail application appears to do
this in the Mail.java see:

http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/mail/src/com/google/gwt/sample/mail/client/Mail.java#42
http://code.google.com/p/google-web-toolkit/source/browse/trunk/samples/mail/src/com/google/gwt/sample/mail/client/Mail.java#59

ciao.

On Sat, Feb 20, 2010 at 2:17 PM, mibtar <[email protected]> wrote:

> hi, i'm a bit new to this. but i'm having problems with styles,
> associating css files in particular.
>
> i'm using gwt 2.0 on firefox 3.5.7 and running on ubuntu.
>
> i created this class:
>
> public interface Resource extends ClientBundle{
>    public interface DefaultStyle extends CssResource{
>        public String menu();
>    }
>
>    @Source("defaultstyle.css")
>    public DefaultStyle defaultstyle();
> }
>
> defaultstyle.css contains:
>
> .menu{
>    padding:5px;
>    border-bottom:3px solid #c76df4;
>    border-left:1px solid #c76df4;
>    border-top:1px solid #c76df4;
>    border-right:3px solid #c76df4;
>    background-color:#EEEEEE;
>    color: #324971;
> }
>
> then i tried using the class:
>
> Resource resource = GWT.create(Resource.class);
> Label lbl = new Label("test");
> lbl.setStyleName(resource.defaultstyle().menu());
>
>
> simply doesn't work. i can't seem to figure it out, i've tried
> changing the class name
> in the css . but nothing seems to work.
>
>
> also, does anyone have any idea why the widget are not using any
> styles? for example, when i create a button i just get a plain button
> and not like the button in the showcase.
>
> --
> 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]<google-web-toolkit%[email protected]>
> .
> 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 [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.

Reply via email to