How can you force the width of a datatable ? Link to datatable example
I tried creating a table with a fixed width 350px and had a left column using 20% of width and the datatable in the right column. This doesn't work though as the datatable is pushing table to be bigger than 350px wide and also the left column is smaller than 20%
<table width="350">
<tr>
<td width="20%"> Left TD <td>
<td width="80%"> Datatable </td>
</tr>
</table>
Use width in percentage
for example
<table width="100%">
<tr>
<td width="20%"> Left TD <td>
<td width="80%"> Datatable </td>
</tr>
</table>
<table width="350px" border="1">
<tr>
<td width="20%"> Left TD <td>
<td width="80%"> Datatable </td>
</tr>
</table>
use of width="350px"
and the border="1"
is going to make it look good. try this
The problem is the select elements in the footer, set this and adjust to your needs
CSS
select{
width: 100%;
}
DEMO HERE
you'd better use css to customise your table, and deal with width, max-width, min-width,... also notice that datatable applies stylesheet to your table. You can see what is affected by doing a right click on your table header and click "inspect element" (you have this option in most of the navigators). See this post wich should answer your question : CSS: Truncate table cells, but fit as much as possible