thanks, if <html> and <body> set height:100%, then the problem fixed.
in attachment 100%Method.png, the yellow is the body margin:10px, then the blue is the body, everything is normal.
But I try some other method and found some unknown.
1) I try not set height = 100% in html and body, instead I try to add the following code in onModuleLoad
rootPanel.getElement().getStyle().setPosition(Position.ABSOLUTE);
the result is as absolute01.png and absolute02.png
as shown in absolute01.png, when I highlight the body tag, only the top is yellowed, but the margin should applied on all 4 side, so why only the top margin is yellowed?
2) as shown in absolute02.png, when I highlight the div id="uniqueID" tag, the area is blue, but the top and the left is white color, what is it? I have checked and the right and the bottom have no this white space.
3) I try to add one more code in onModuleLoad as follow:
rootPanel.setWidgetPosition(basseDockLayoutPanel, 0, 0);
this try to put the baseDockLayoutPanel to absolute position left:0 and top:0 but
the output is widgetPosition00.png, which is same as absolute01.png but with following error message in console
14:26:39.432 [ERROR] [alsadminviewerwebapp] Warning: com.google.gwt.user.client.ui.RootPanel descendants will be incorrectly positioned, i.e. not relative to their parent element, when 'position:static', which is the CSS default, is in effect. One possible fix is to call 'panel.getElement().getStyle().setPosition(Position.RELATIVE)'.
java.lang.IllegalStateException: com.google.gwt.user.client.ui.RootPanel is missing CSS 'position:{relative,absolute,fixed}'
at com.google.gwt.user.client.ui.AbsolutePanel.verifyPositionNotStatic(AbsolutePanel.java:288)
at com.google.gwt.user.client.ui.AbsolutePanel.setWidgetPosition(AbsolutePanel.java:218)
at hk.gov.ehr.service.tch.als.admin.viewer.client.AlsAdminViewerWebApp.onModuleLoad(AlsAdminViewerWebApp.java:71)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:396)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:200)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:525)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
at java.lang.Thread.run(Thread.java:662)
why calling setWidgetPosition will prompt this error in console?