There is no straightforward way to achieve that result. You have to alter CSS (add the following):
.row {
position: relative;
}
.element {
position: absolute;
/*Remove the float attribute, which is obsolete*/
}
The JavaScript code has also to be altered:
$(function(){
var zIndex = 100;
$('.element').mouseover(function(){
var originalHeight = $(this).height();
$(this).resizable({start: function() {
$(this).css('z-index', ++zIndex);
}, stop: function(){
/*Horizontal fix*/
var nxt = $(this).nextAll();
var width = $(this).position().left + $(this).width();
var safeWidth = width;
var root = $(this).parent();
var thisheight = $(this).height();
var height = root.height();
for(var i=0,l=nxt.length;i<l;i++){
$(nxt[i]).css("left", width+"px");
width += $(nxt[i]).width();
if($(nxt[i]).height() > height) safeWidth = width;
}
/*Vertical fix*/
if(thisheight > height || originalHeight > thisheight){
var nxt = root.nextAll();
for(var i=0, l=nxt.length; i<l; i++){
var tht = nxt[i];
if(height >= thisheight){
width = 0;
} else {
width = safeWidth;
}
height += $(tht).height();
if(!/(^|\s)row(\s|$)/.test(tht.className)){
continue;
}
var in_nxt = $(tht).children();
for(var j=0,k=in_nxt.length; j<k; j++){
$(in_nxt[j]).css("left", width+"px");
width += $(in_nxt[j]).width();
}
}
}
originalHeight = thisheight;
}});
});
$('.element').each(function(){
var ths = $(this).prevAll();
var width = 0;
for(var i=0,l=ths.length;i<l;i++)width+=$(ths[i]).width();
$(this).css("left", width+"px")});
});
Preview: http://jsfiddle.net/cQFzf/12/