View Full Version : Master Page, Centered Viewport

Dec 21, 2009, 11:59 AM
I can't seem to find an example of how to center (or include) a viewport inside its parent container when the parent is a div.

so for example suppose I have a div that is 800px wide and currently centered within the browser. Then I add a viewport inside that div. Any content I put in the viewport seems to expand and take up the entire browser window when I really want it to observe the parents width.

It almost seems as if everything is being rendered with absolute positioning. Is there a good example of centering things within the browser window? Maybe with a different ext container control?

Thanks in advance

Dec 22, 2009, 10:05 AM
It seems as if the only way to make this work the way I want it to is to use a combination of viewports, columnlayout, panels and borderlayout controls. It seems like there should be an easier way to inherit a non ext parent css values (in other words not render with absolute positioning).

I got it working, its just a load more markup than expected. Of course this may be my infamiliarity with the control suite. I guess when I have more time I'll revisit this and try to trim down the number of controls needed to get this effect.