I'm building a personalized table, and I want to make the scroll with the fixed header possibile. I've created a div which will substitute the original header table and will be fixed.
I made a simple JS function:
function resizeCol(numerocolonne){
var leng= $("tbody tr").length;
for(i=1;i<=numerocolonne; i++){
var bigger=$('[value="1-'+i+'"]').width();
$('[value="0-'+i+'"]').width(bigger);
}
}
which calculate the width of the columns and set the width for the fake header. All works good, except that I don't know how to allineate properly the fake header columns and the real ones.
I don't know if I explained myself clearly, so here is a fiddle:
I can't make the #header div wider than the window.