Set columns width

Set columns width

xscoutxscout Posts: 1Questions: 1Answers: 0

Hello.

I'm using DataTables 1.10.16 with Bootstrap 3 integration.

I initialize datables as follow:

$('#dataTable').DataTable({
"paging": false,
"searching": true,
"dom": "t",
"autoWidth": false,
"language": {
"url": "/js/dataTables.Russian.json"
},
// Тюнинг размеров колонок
"columnDefs": [
{ "width": "150px", "targets": 1}
]
});

But in result i've got rendered column width 173 px (by browser devtools measurement). In TH style there is width:150px. What i should to do, to have 150px width rendered?

Thannks.

Answers

  • allanallan Posts: 63,457Questions: 1Answers: 10,465 Site admin

    Happy to take a look at a test case showing the issue. My guess is that the content in that column doesn't fit into 150px, but without a test case it is impossible to say.

    Allan

This discussion has been closed.