Chroder
4 Nov 2006, 5:11 PM
I'm trying to creating something like this:
+----------------------------------------------------------------+
| Header |
+----------------------------------------------------------------+
| Nav | Top part |
| | |
| | |
| | |
| +----------------------------------+----------------------+
| | Area 1 | Area 2 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
+------+----------------------------------+----------------------+
Things seem to work fine except for the bottom part is empty. I think the width/height isn't being applied?
HTML:
<div id="container" >
<div id="header" class="ylayout-inactive-content">
Header
</div>
<div id="main_nav" class="ylayout-inactive-content">
Nav
</div>
<div id="main_center" class="ylayout-inactive-content"></div>
<dib id="mychats_grid" class="ylayout-inactive-content">
Grid
</div>
<dib id="mychats_center" class="ylayout-inactive-content"></div>
<dib id="mychats_messages" class="ylayout-inactive-content">
Messages
</div>
<dib id="mychats_info" class="ylayout-inactive-content">
Info
</div>
</div>
And the JS:
var mainLayout = new YAHOO.ext.BorderLayout(document.body, {
north: {
split:false,
initialSize: 35
},
west: {
split:true,
initialSize: 200,
titlebar: true,
collapsible: true,
minSize: 100,
maxSize: 400
},
center: {
autoScroll: false
}
});
var mychatsLayoutSub = new YAHOO.ext.BorderLayout('mychats_center', {
east: {
split: true,
initialSize: 400,
collapsible: true,
titlebar: true
},
center: {
autoScroll: true
}
});
mychatsLayoutSub.add('east', new YAHOO.ext.ContentPanel('mychats_info', {title: 'Information', fitToFrame:true}));
mychatsLayoutSub.add('center', new YAHOO.ext.ContentPanel('mychats_messages'));
var mychatsLayout = new YAHOO.ext.BorderLayout('main_center', {
north: {
split: true,
initialSize: 300,
collapsible: true,
minSize: 100,
titlebar: true
},
center: {
autoScroll: false
}
});
mychatsLayout.add('north', new YAHOO.ext.ContentPanel('mychats_grid', {title: 'Chats', fitToFrame:true}));
mychatsLayout.add('center', new YAHOO.ext.NestedLayoutPanel(mychatsLayoutSub), {fitToFrame:true});
mainLayout.beginUpdate();
mainLayout.add('north', new YAHOO.ext.ContentPanel('header', {fitToFrame:true}));
mainLayout.add('west', new YAHOO.ext.ContentPanel('main_nav', {title: 'Navigation', fitToFrame:true}));
mainLayout.add('center', new YAHOO.ext.NestedLayoutPanel(mychatsLayout));
mainLayout.endUpdate();
Thanks for any ideas anyone has :D I hope I didn't make an obvious mistake :oops:
+----------------------------------------------------------------+
| Header |
+----------------------------------------------------------------+
| Nav | Top part |
| | |
| | |
| | |
| +----------------------------------+----------------------+
| | Area 1 | Area 2 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
+------+----------------------------------+----------------------+
Things seem to work fine except for the bottom part is empty. I think the width/height isn't being applied?
HTML:
<div id="container" >
<div id="header" class="ylayout-inactive-content">
Header
</div>
<div id="main_nav" class="ylayout-inactive-content">
Nav
</div>
<div id="main_center" class="ylayout-inactive-content"></div>
<dib id="mychats_grid" class="ylayout-inactive-content">
Grid
</div>
<dib id="mychats_center" class="ylayout-inactive-content"></div>
<dib id="mychats_messages" class="ylayout-inactive-content">
Messages
</div>
<dib id="mychats_info" class="ylayout-inactive-content">
Info
</div>
</div>
And the JS:
var mainLayout = new YAHOO.ext.BorderLayout(document.body, {
north: {
split:false,
initialSize: 35
},
west: {
split:true,
initialSize: 200,
titlebar: true,
collapsible: true,
minSize: 100,
maxSize: 400
},
center: {
autoScroll: false
}
});
var mychatsLayoutSub = new YAHOO.ext.BorderLayout('mychats_center', {
east: {
split: true,
initialSize: 400,
collapsible: true,
titlebar: true
},
center: {
autoScroll: true
}
});
mychatsLayoutSub.add('east', new YAHOO.ext.ContentPanel('mychats_info', {title: 'Information', fitToFrame:true}));
mychatsLayoutSub.add('center', new YAHOO.ext.ContentPanel('mychats_messages'));
var mychatsLayout = new YAHOO.ext.BorderLayout('main_center', {
north: {
split: true,
initialSize: 300,
collapsible: true,
minSize: 100,
titlebar: true
},
center: {
autoScroll: false
}
});
mychatsLayout.add('north', new YAHOO.ext.ContentPanel('mychats_grid', {title: 'Chats', fitToFrame:true}));
mychatsLayout.add('center', new YAHOO.ext.NestedLayoutPanel(mychatsLayoutSub), {fitToFrame:true});
mainLayout.beginUpdate();
mainLayout.add('north', new YAHOO.ext.ContentPanel('header', {fitToFrame:true}));
mainLayout.add('west', new YAHOO.ext.ContentPanel('main_nav', {title: 'Navigation', fitToFrame:true}));
mainLayout.add('center', new YAHOO.ext.NestedLayoutPanel(mychatsLayout));
mainLayout.endUpdate();
Thanks for any ideas anyone has :D I hope I didn't make an obvious mistake :oops: