Column width

Column width

plwplw Posts: 22Questions: 7Answers: 0

I have this

$(document).ready(function () {
$("#DTable").dataTable({
"pageLength": 30,
autoWidth: false,
columnDefs: [
{ type: 'natural-nohtml', targets: '0' },
{ width: '303px', targets: '2' }
],
"lengthMenu": [ 10, 25, 30, 50, 75, 100 ],
"bFilter": false,
"aaSorting": [[ 0, 'asc' ]],
"aoColumns": [
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": true },
{ "bSortable": false }
]
});
});

But whatever I do the width of the third column which should be 303px is being ignored. Any idea how I can set the width if the third column. The default isn't wide enough - thanks

Answers

  • allanallan Posts: 54,881Questions: 1Answers: 8,601 Site admin

    Happy take a look at a test case showing the issue.

    Allan

  • plwplw Posts: 22Questions: 7Answers: 0
    edited October 25

    It is ok - found the problem - there was an <h3> with a width as part of the table. I removed th ewidth and everything is now ok

Sign In or Register to comment.