Domanda

I have a table and I want to resize the column of the table

$("#tableSortable").dataTable({
        "bAutoWidth": false,
        "aoColumns": [
        { sWidth: '1%' },
        { sWidth: '1%' },
        { sWidth: '1%' },
        { sWidth: '1%' } ]
    });
    tableSortable.fnDraw();
});
È stato utile?

Soluzione

Well in comments Rory McCrossan mentioned . Yes the combined cells of table should be 100%

Well in your case there are 4 columns right then its pretty straight farword .

"aoColumns": [
        { sWidth: '25%' },
        { sWidth: '25%' },
        { sWidth: '25%' },
        { sWidth: '25%' } ]

And if you want to do it in a different way you can set bAutoWidth:True .

Regards

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top