I have a html panel and i want to add the html panel to browser screen hence i used rootPanel.get().add(htmlPanel);
. But their is a extra space between the starting of the screen and the first widget in html panel (As in image). I tried with setting rootPanel.get().setheight("100%") and rootPanel.get().setsize("100%","100%")
but it doesn't seem to work please help i want to remove the extra space and so that the widget starts from beginning.
Asked
Active
Viewed 329 times
1
-
2Did you inspect that "extra space" with your browser's Dev Tools? You're adding the `htmlPanel` at the _end_ of the `RootPanel.get()` (i.e. the `` element), so have a look what you already have in there. – Thomas Broyer Jul 15 '13 at 10:15
-
yes its automatically adding a padding of 50px can u please tell me how can i remove it – Ekata Jul 15 '13 at 10:22
-
Which element the padding is added to? what's the selector that adds it? and which stylesheet does it come from? The Dev Tools should give you all the needed information to debug that issue. – Thomas Broyer Jul 15 '13 at 10:34
-
Its adding padding to the body element in gwt-bootstrap css and every time when i war is generated this is re-created hence im not able to change the css property – Ekata Jul 15 '13 at 10:44
1 Answers
3
This padding is added by GWT Bootstrap for its NavBar
widget. See the note in the javadoc:
NOTE: We assume that most people will use the
ResponsiveNavbar
, so, we automatically add apadding-top: 50px
inbody
.If you don't want this, you have to put apadding-top: 0px;
manually in your documentbody
tag.
See also https://github.com/gwtbootstrap/gwt-bootstrap/issues/120

Thomas Broyer
- 64,353
- 7
- 91
- 164
-
At this point, it seems like gwt-bootstrap is a pile of crap, and you'd better use Bootstrap without gwt-bootstrap. – Thomas Broyer Jul 15 '13 at 11:00