datatable width 100% not working
datatable width 100% not working
![Matsukaya](https://secure.gravatar.com/avatar/ce8f9ad5173e3c26867a2f3594907a16/?default=https%3A%2F%2Fvanillicon.com%2Fce8f9ad5173e3c26867a2f3594907a16_200.png&rating=g&size=120)
Hello,
I am trying to set 100% as width for a default data-table without rows. I set the following settings:
<
table style="width:100% !important;">
....
var table = $("#alarmTable").DataTable({
searching: false,
paging: false,
info: false,
"autoWidth": false,
"columns": [
{ "width": "20%" },
{ "width": "80%" },
]
});
and the table is drawing:
Any idea, how to set data-table 100% width?
This discussion has been closed.
Answers
Your code seems to work here:
http://live.datatables.net/rocexere/1
Must something in your environment. Maybe you can update the test case to show your issue.
Kevin