View Full Version : Padding for Panel/Viewport

10 Jan 2011, 11:17 AM
I'm using
Viewport -> Panel -> TabPanel

with viewport renderTo set to some element ID..

It renders fine and all, but there is also code I am using that renders to the beginning of the page (to put a bar on top). The TabPanel is actually overlayed on top of other stuff.

A lot of the things I've tried aren't introducing any space between the TabPanel and the top of the page. I've tried br's, tables, absolute positioning, etc.

What is the best way of spacing/moving the tabpanel?

10 Jan 2011, 4:14 PM
A Viewport should only be used if you want to use the entire browser viewport. Other wise use Container or Panel. Is the TabPanel the only child of the Panel? If so, remove the Panel as TabPanel extends Panel.

If you are using Panel but there are multiple child items under it, you can specify padding: "0 0 0 0" to the Panel and it will put the padding in it's body el.