Thank you for reporting this bug. We will make it our priority to review this report.
-
Ext GWT Premium Member
[CLOSED] Undesired top/left margin around viewport with borderlayoutcontainer
I used the following code snippet and I cannot get rid of the unwanted margin on the left and top of the viewport
Code:
public class MySampleApplication implements EntryPoint, IsWidget {
public void onModuleLoad() {
Viewport viewport = new Viewport();
viewport.setWidget(this);
RootPanel.get().add(viewport);
}
public Widget asWidget() {
final BorderLayoutContainer con = new BorderLayoutContainer();
con.setBorders(true);
con.setLayoutData(new MarginData(0, 0, 0, 0));
return con;
}
}
it shows up as (tried it in chrome and ie9) :
marginissue.jpg
Am I overlooking something here?
-
This looks like you are not loading the reset.css file.
-
Ext GWT Premium Member
Thanks Sven for responding (on a sunday
)
You were right, the path to my 'reset.css' had a typo, all is fine now
-
Sencha User
how did you solved this =
-
Kolza13, as Sven said (and joosb verified) this is almost always caused by forgetting to add a reference to reset.css. Verify that you've followed all of the steps in the GXT setup instructions, and that there are no errors in the browser's console when loading the app.
-
Sencha User

Originally Posted by
Colin Alworth
Kolza13, as Sven said (and joosb verified) this is almost always caused by forgetting to add a reference to reset.css. Verify that you've followed all of the steps in the GXT setup instructions, and that there are no errors in the browser's console when loading the app.
the are no errors, the css file is loaded
Capture.jpg
-
Ah, you've turned on the GWT theme 'clean'. This deliberately adds that spacing back in again, even if you have the reset.css working correctly. Since both GXT and GWT are modifying general parts of the page, it can be a toss up to see who will 'win' and actually make changes.
If you do not need or use the clean theme, remove it from your module - note that we are not aware of any other GWT theme causing an issue like this, so you might be good with moving to one of the others.
If you do need the clean theme, you'll need to add more CSS to stop it from adding this padding back in to the page again.
-
Sencha User
Found the solution :
the problem was the gwt theme.
<inherits name='com.google.gwt.user.theme.clean.Clean' />
clean.css
was set to:
body {
color: black;
margin: 10px;
border: 0px;
padding: 0px;
background: #fff;
direction: ltr;
}