posted 13 years ago
All,
I'm trying to accomplish what I thought would be the simple task of creating a GUI such that there is a left side navigation bar, and a central main-data screen.
That is, say, the left 20% or so of the screen will be a vertical panel.
The remainder will have data displayed. It very likely will not take up the remainder of the screen, and thus should be centered in the remaining area.
I've tried using a HorizontalPanel as the main component added to the root panel - and setting the left side to a style that has:
width:20%;
and setting the data area to:
margin-left: auto;
margin-right: auto;
width: 75%;
However, it seems to just cram everything to the left into as small a space as possible, as if readying for more sub-Panels to be added to the HorizontalPanel.
So, what I have, in terms of what is inside what, is:
RootPanel
- HorizontalPanel
-- VerticalPanel (navigation stuff - width: 20%)
-- DockPanel (main data - width 75%, left and right margin auto)
What am I doing wrong? How do I get the arrangement that I want to get?
Thanks in advance.