How to create a fixed position panel

216 views
Skip to first unread message

Guillaume

unread,
Feb 7, 2008, 5:23:33 AM2/7/08
to Google Web Toolkit
Hi,

I would like my application to be cut in two panels :
- one panel containing all the stuff my app does
- another one with some messages from the app, kind of a status bar

The first panel should be a scrollable standard one but the second
panel (status bar) should be at the bottom (or top) of the "webpage"
and stay there even if the webpage is scrolled up or down.

I could use an HTML frameset to do the trick but I would really like
my site not to be with frame.

Any idea how to do this trick ?

Thanks in advance
PS : I'm new to GWT but I'm a solid Java engineer.

jhulford

unread,
Feb 8, 2008, 10:10:06 AM2/8/08
to Google Web Toolkit
You'll want to use CSS "position: fixed;" to do this. If you must
support IE6 there are some hacks that you'll have to implement to do
this since it doesn't support that attribute. Just search "IE6
position fixed" and you'll get several workarounds.

Guillaume

unread,
Feb 8, 2008, 11:56:03 AM2/8/08
to Google Web Toolkit
Ok, I'll try that.

Thanks

walden

unread,
Feb 8, 2008, 11:56:36 AM2/8/08
to Google Web Toolkit
Guillaume,

If I were you I would use a VerticalPanel to keep the content area
above the status area, and I would embed a ScrollPanel inside the top
cell of the VerticalPanel and place your scrollable content in there.
If you can get that working with some explit sizes set, you can then
look at resizing the whole composite to fill the client area. That
should keep everything where you want it, regardless of window resize
events.

I think "fixed" positioning on the web is a bit of a contriveance, and
does not do what users generally expect, not to mention the browser
incompatability problem that jhulford mentioned.

Walden

On Feb 7, 5:23 am, Guillaume <guillaume.laur...@gmail.com> wrote:
Reply all
Reply to author
Forward
0 new messages