PDA

View Full Version : panel display outside the div in whici it's renderTo



floflo
15 Jan 2010, 12:00 PM
Hi,

i have an html div with specified height. I want to display in this div a panel whom height fits with the div height.
But, when the containt of the panel is to big, it is displayed ouside the div, it keeps going at the bottom until the text is over. I want to fix it, and use scroll.

But the div in which the panel is renderTo may changes its size while the browser height is changing.



.module-actu {
position: absolute;
width: 150px;
top: 0px;
bottom: 122px;
right: 0px;
border-left: 1px solid white;
padding-top: 135px;
padding-left: 10px;
}
<div id="moduleActu" class="module-actu"></div>

this.panelActu = new Ext.Panel({
border: false,
renderTo: 'moduleActu',
autoHeight: true,
autoScroll: true,
defaults: {
border: false
},
id: 'actuDesktopPanel'
});
how to make sure the panel is displayed in the DIV and can't go outside if the containt is too big ?

thks for help

flo

Animal
15 Jan 2010, 12:32 PM
You have asked for it to be autoHeight. SO that is what it is doing.

If you really don't want to use a Viewport, use the FitToParent plugin.