On my webpage I have a menu ( HorizontalPanel
) that should be bound to the content of the page. To do this, I tried to use the RootLayoutPanel
class and add a southern widget to it, and I succeeded. but the problem is that the menu is not centered. I tried to add another CSS in which I wrote (and noticed the position):
.cetrer { Margin-left : auto; margin-right: auto; position: relative; }
But when the page falls asleep, the position is set to an absolute value according to GWT. And I tried to force the position by adding this character to the code, but it did not work:
DOM.setElementAttribute(menuBar.getElement(), "style", "position: relative;");
So, is there any solution to fix it? Thanks
source share