Page back color

2 views
Skip to first unread message

Alexei Telles

unread,
Dec 22, 2009, 10:58:12 AM12/22/09
to Google Web Toolkit
Hi guys, I am trying to change the back color of my page, but I can't
do that..

I tried by CSS

body {
background-color: #f1f2f3;
}

and setting the bgcolor property of the body tag in my HTML file:

<body bgcolor="#f1f2f3">

</body>

It's not working.

Any help?

Thanks again

ALEXEI BARBONI

unread,
Dec 22, 2009, 11:16:56 AM12/22/09
to Google Web Toolkit
And now I see that nothing that is inside my body css (like margin, font, etc) works...

Where do I set properties for my hole page????

thanks


2009/12/22 Alexei Telles <alexei...@gmail.com>

Ian Bambury

unread,
Dec 22, 2009, 3:00:12 PM12/22/09
to google-we...@googlegroups.com
Do you have some kind of GWT style overriding it?

Have a look in your project gwt.xml file. If you are adding css in the html host page, the it will be overridden by that.

Ian

http://examples.roughian.com


2009/12/22 ALEXEI BARBONI <alexei...@gmail.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-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.

ALEXEI BARBONI

unread,
Dec 22, 2009, 3:38:52 PM12/22/09
to google-we...@googlegroups.com
Hi Ian

My CSS file works fine. I mean, every widget that i put setStyleName takes all properties that are in my CSS file.

I need to know where do I set the properties for the hole page.

Uselly I put inside body { } in my CSS file. But in my GWT project it does not work...





2009/12/22 Ian Bambury <ianba...@gmail.com>

Ian Bambury

unread,
Dec 22, 2009, 3:50:31 PM12/22/09
to google-we...@googlegroups.com
Thing is, if you set the style name to "MyStyleName" then there is no corresponding .MyStyleName in the GWT styles to override it.

There is a body{} in there though and if you are including your style sheet from the html file (say with a <link>) then it will get overridden by the GWT style sheet which is included (later) from the gwt.xml file.

For example, the standard GWT css file has


  background: #ffc;

for the body.

Two things:
1) Are you including your css from the html file?


2) Does your gwt.xml file include a GWT style sheet e.g.<inherits name='com.google.gwt.user.theme.standard.Standard'/> ?


ALEXEI BARBONI

unread,
Dec 27, 2009, 3:41:25 PM12/27/09
to google-we...@googlegroups.com
All right Ian

I just comented the line <inherits name='com.google.gwt.user.theme.standard.Standard' /> in my gwt.xml and the properties of my body in my CSS file are working

But I lost missed all the formats of the page, that, I guess, are in the <inherits name='com.google.gwt.user.theme.standard.Standard' />

I will have to set it all in my CSS file now...

Am I right?

Thanks a lot


2009/12/22 Ian Bambury <ianba...@gmail.com>

Ian Bambury

unread,
Dec 28, 2009, 7:53:50 AM12/28/09
to google-we...@googlegroups.com
No, you just need to add your CSS file as an entry in the gwt.xml file but after the <inherits name='com.google.gwt.user.theme.standard.Standard' /> line.

That way it gets added after, and it will override the 'standard' file.

Ian

http://examples.roughian.com


2009/12/27 ALEXEI BARBONI <alexei...@gmail.com>

leslie

unread,
Dec 29, 2009, 5:16:22 PM12/29/09
to Google Web Toolkit
Firefox 3.5.6
Mac OS X 10.5.7
Java 1.5.0_13
Eclipse Java EE IDE Galileo Cocoa

Hi Ian. Thanks for your post. I'm basically trying to do the same
thing.

I'm following the instructions I've found here...

http://code.google.com/webtoolkit/doc/latest/DevGuideOrganizingProjects.html#DevGuideModuleXml

My gwt.xml file is similar to the following...

<module rename-to='fooapp'>
<inherits name='com.google.gwt.user.User' />
<inherits name='com.google.gwt.user.theme.standard.Standard' />
<entry-point class='com.foo.client.HelloWorld' />
<source path='client' />
<stylesheet src='/mystyle.css' />
</module>

I've also tried using a relative path since the stylesheet exists in
the same directory as the html file for the application itself inside
the war folder.

<stylesheet src='mystyle.css' />

But the styles aren't being incorporated into the page. Any ideas of
what I'm doing wrong?

leslie

unread,
Dec 30, 2009, 5:14:34 PM12/30/09
to Google Web Toolkit
Disregard my post. Mine appears to be working now, having shut down
everything for the night, restarted, recompiled, reloaded, it's
working I can see that both the stylesheet and the standard theme are
in effect. It must have been a problem with my browser caching or
something.

ALEXEI BARBONI

unread,
Jan 6, 2010, 2:11:06 PM1/6/10
to google-we...@googlegroups.com
All right

Itś working now

Thanks

2009/12/30 leslie <web...@comcast.net>
Reply all
Reply to author
Forward
0 new messages