I'm trying to setup a 2-column layout where the left area is fixed and the main content is fluid. I've seen several answers on here, which tend to work. However, there is some odd behavior when I use a "jsTree" in my "left" area and jQuery UI tabs in the main/content area.
html
<div id="main">
<div id="left">
<div id="tree">
</div>
</div>
<div id="right">
<ul>
<li><a href="#a">A</a></li>
<li><a href="#b">B</a></li>
<li><a href="#c">C</a></li>
</ul>
<div id="a">
<h3>A is here</h3>
</div>
<div id="b">
<h3>B is here</h3>
</div>
<div id="c">
<h3>C is here</h3>
</div>
</div>
</div>
css
#left {
float: left;
width: 200px;
overflow: auto;
}
#right {
margin: 0 0 0 200px;
}
javascript
$(document).ready(function() {
$('#right').tabs();
$('#tree').jstree({
"plugins" : [ "json_data", "themes"],
"json_data" : {
"data" : [
{
"data" : "A node",
"children" : [ "Child 1", "Child 2" ]
},
{
"attr" : { "id" : "li.node.id" },
"data" : {
"title" : "Long format demo",
"attr" : { "href" : "#" }
}
}
]
},
});
});
The problem I'm having is, as I expand the tree (on the left) the tabs on the right start getting funky. The area containing the tabs (the element I believe) grows vertically.
Take a look here for this example: http://jsfiddle.net/codecraig/gBUw2/