How to position the GWT dialog to the bottom right corner of the browser?

Tags: css,gwt,uibinder

Problem :

    int browserHeight=Window.getClientHeight();
    int browserWidth=Window.getClientWidth();
    dialog.setPopupPosition(browserWidth-dialog.getElement().getClientWidth(), browserHeight-dialog.getElement().getClientHeight());;

The above code will make the position starts from the very last pixel of the browser (ie bottom=0), which is not what i expect. I don't like css cos browser incompatible problem. Also there a footer in my website (height=50px) if u can make the dialog to not to lay on the footer like the following pic enter image description here

so, How to position the GWT dialog to the bottom right corner of the browser?

Solution :

This is the right way

dialogBox.setPopupPositionAndShow(new PositionCallback(){

    public void setPosition(int offsetWidth, int offsetHeight) {
                        // TODO Auto-generated method stub
        dialogBox.setPopupPosition(parentDockLayoutPanel().getOffsetWidth()-         dialogBox.getOffsetWidth(), 
parentDockLayoutPanel().getOffsetHeight() - dialogBox.getOffsetHeight()-50);


    CSS Howto..

    How to randomly pick colors and shapes from a for loop and display it in another div?

    All CSS menu when hover show submenu

    Height isn't showing up full on everything except Chrome

    How to set height?

    How to make a simple contact form input box responsive

    How can i change jquery-div creation to some other method

    How to make the posts of a content type horizontal scrollabel?

    What html or css attribute should I modify so that a mobile browser shows the website with no blank space on the right?

    How do I vertically center an img in a div?

    CSS: show only the last x items in a list

    Bootstrap: user agent css styles misbehaving how to solve this

    How to edit Skype contact me button CSS?

    How to position images next to text using CSS

    How to let the users style a web component with their own CSS?

    How to add a new CSS class to a Link Badge if the value is 0?

    How to keep an image and text (vmax font) aligned when resizing browser?

    How to make a box's content overflow past background

    How do I move all the li elements with specific css style to another ul?

    How to strach div in some line to “all left space” with css

    How to change the font family of Highchart to Bootstrap css default font family

    How to use Vendor Properties in Multiple Backgrounds?

    How do i get css3pie to work on all Joomla 2.5 pages not just default page

    How to make a line in a table with CSS

    CSS - how to align different font-sizes to each other?

    How to create a Page Header (an Image) for print using css

    How to toggle the sidebar menu for every browser size?

    How can I use ellipses in a fluid width table without making each column the same size?

    how to create a rotateY animation via jQuery and css 3

    How to apply custom size to text field in rails

    How to create a dynamically sized form background with CSS?