tags:

views:

281

answers:

3

I'm developing application with GWT 2 and would like to add float panel that stick to the bottom of the screen (not page, like chat panel in facebook). What is the best way to make that kind of panel?

+2  A: 

This can be done by adding the CSS attribute position: fixed to the div in question.

Read more here: http://www.quirksmode.org/css/position.html

Jason Hall
But how do I put it on the bottom-right corner of the browser window?
Maksim
position: fixed; bottom: 0px; right: 0px;
Jason Hall
A: 

I think you can do this by CSS. All you need is any GWT Panel and then style it using CSS. Check out http://www.lwis.net/journal/2008/02/08/pure-css-sticky-footer/

jaxvy
+2  A: 

If I understood you correctly, you should apply the style below to a Panel (any basic Panel should do: FlowPanel, HTMLPanel, etc) and add it to the body (it doesn't have to be <body> but we know that it's always there and won't be removed ;)) via RootPanel.get().add(fixedPanel);

position: absolute; /* Or fixed - depends on what you want */
right: 0; /* The part that puts the Panel in bottom right of the page/client area */
bottom: 0;
Igor Klimer