Code :
<div id="widget1">
<div class="part blue">this is the part</div>
<div class="part white">of the genial</div>
<div class="part red">and good widget</div>
</div>
Let’s say that div#widget1 is 99px width and div.part are 33px by default.
How can I easily resize div.blue by increasing its width and deacreasing width of other div.part proportionnaly ?
http://jqueryui.com/demos/resizable/#synchronous-resize : give an example which show element increase in the same time.
possible duplicate of resizing div panel
Testing my solution here : http://jsfiddle.net/lnplnp/MxKLH/
But this do perfectly what I need :
JAVASCRIPT :
HTML :
CSS :
I think the JS can be improve… but it’s working !