Div splitter resize problems <p>I created a splitter using javascript component, but it works only with two columns, if I add a third column, start to have problems with resizing.</p> <p>In the excerpt below is where is the logic to resize.</p> <pre><code>var pos = (e.pageX - dragoffset.x); el.style.left = (pos) + "px"; var total_area = $(el).prev().width() + $(el).next().width(); var f_1 = (pos); var f_2 = (total_area - pos); $(el).prev().width(f_1); $(el).next().width(f_2); </code></pre> <p>I have posted my project in <a href="https://jsfiddle.net/m4y3rkqc/7/" rel="nofollow">https://jsfiddle.net/m4y3rkqc/7/</a></p> <p>What parameters should I consider to calculate the size correctly and dynamically?</p>