http://jsfiddle.net/MNgMB/1/
Is this what you were looking for? Let me know.
HTML
<div id="inline_container">
<div id="toggle_menu">
<div id="toggle">
</div>
</div>
<div id="main_container">main container</div>
</div>
Javascript
var toggled = true;
$("#toggle_menu").click(function(){
if(toggled) {
toggled=false;
$(this).animate({width: "20px"}, "fast");
}else {
toggled=true;
$(this).animate({width: "200px"}, "fast");
}
});
CSS
* {margin: 0; padding: 0;}
.body {height: 100%; width: 100%;}
#inline_container {height: 500px; width: 100%;}
#toggle_menu {height: 100%; width: 20px; display: inline-block; float: left; background: lime;}
#main_container {height: 100%; width: 65%; display: inline-block; float: left;}
#toggle {height: 100%; width: 20px; display: inline-block; float:left; background: green;}