Once more thanks for the reply.
Figured it out... somehow...
I created a new project Test and the Test.java entry point was created. I opened the Test.java design view and added a button into it. It got absolute positioned and since I wanted to have it over the full width I put it at LEFT 0 and set its width property to 100%. This left me with source code:
- Code: Select all
rootPanel.add(button, 0, 0);
button.setWidth("100%");
The design preview, and hosted mode (IE7) showed it short on the right side, but compiling the code and running it in firefox showed the button over the full length. IE7 after compiling showed short.
Since the Test.css file body class has a margin of 5px, this would seem to be causing the behavior. Mozilla looks to respect the absolute positioning at 0 and width 100% and ignores the 5px margin. IE7 is positioning the button at absolute 0 but leaves space on the right which looks to be double the margin (10px).
I guess absolute positioning on the edges and margins do not work well together. However when I changed the css file 5px margin to 0px nothing changed for me. All remained the same.
I kept on testing with creating new projects but overlooked one thing. I never changed the
- Code: Select all
rootPanel.add(button, 0, 0);
to
- Code: Select all
rootPanel.add(button);
When I did so, all was fine.
However changing the code back to
- Code: Select all
rootPanel.add(button, 0, 0);
still left it fine...
Playing around with this a bit I still have the shortage on the right side now and then (with both 0 and 5px css margins).
But calling the rootPanel.add without coordinates always fixes it. After the fix you can add the proper top coordinate.
Art