columns not resizing to fill table width
columns not resizing to fill table width
so i've got a table defined as follows:
[code] var results_dt = $("#results").dataTable({
aoColumnDefs: [
{ aTargets: [ 0 ], sWidth: "70px" },
{ aTargets: [ 1 ], sWidth: "200px" },
{ aTargets: [ 2 ], sWidth: "200px" },
{ aTargets: [ 4 ], sClass: "center", sWidth: "65px" },
{ aTargets: [ 5 ], sClass: "center", sWidth: "65px" }
],
bJQueryUI: true,
bProcessing: true,
bAutoWidth: true,
sAjaxSource: "'.WWW_ROOT.'handler.php?action=list_files&"+form_search.serialize()
});[/code]
by my understanding, this should set a fixed width to every column but the 4th one, allowing it to fill up the available space left in the table, however the results that I get look like this: http://gyazo.com/651e931e6c980e11e6b1497a5e695bed
any ideas on how to get the 4th column to properly fill up the remaining space?
I tried downloading v1.8.2 (was using v1.8.1) but still same effect.
[code] var results_dt = $("#results").dataTable({
aoColumnDefs: [
{ aTargets: [ 0 ], sWidth: "70px" },
{ aTargets: [ 1 ], sWidth: "200px" },
{ aTargets: [ 2 ], sWidth: "200px" },
{ aTargets: [ 4 ], sClass: "center", sWidth: "65px" },
{ aTargets: [ 5 ], sClass: "center", sWidth: "65px" }
],
bJQueryUI: true,
bProcessing: true,
bAutoWidth: true,
sAjaxSource: "'.WWW_ROOT.'handler.php?action=list_files&"+form_search.serialize()
});[/code]
by my understanding, this should set a fixed width to every column but the 4th one, allowing it to fill up the available space left in the table, however the results that I get look like this: http://gyazo.com/651e931e6c980e11e6b1497a5e695bed
any ideas on how to get the 4th column to properly fill up the remaining space?
I tried downloading v1.8.2 (was using v1.8.1) but still same effect.
This discussion has been closed.
Replies
[code]
table { width: 100% }
[/code]
somewhere in your CSS if you want to have a table take up 100% width?
Allan
[code]
DateCruiseNameCommentMultiple Cruises?Planning Future Cruise
[/code]
and the css that relates to it
[code] #results {
width: 100%;
}
#results .category_option {
display: inline-block;
}
#results td {
padding: 2px;
}
#results .center {
text-align: center;
}[/code]
Allan