Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

datatables change width of columns

$('#example').dataTable( {
  "autoWidth": false, // might need this
  "columns": [
    { "width": "20%" },
    null, // automatically calculates
    null  // remaining width
  ]
} );
Comment

datatable column width

columnDefs: [
            { width: 200, targets: 0 }
        ],
Comment

datatables change width of columns

Javascript
1
2
3
4
5
$('#example').dataTable( {
  "columnDefs": [
    { "width": "20%", "targets": 0 }
  ]
} );
Comment

datatable giving default width to colums

$('#table_selector').dataTable( {
  "autoWidth": false, //<-------- add this
  //give custom width
  "columns": [
    { "width": "10%" },
} );
Comment

datatable width column

table.display {
  margin: 0 auto;
  width: 100%;
  clear: both;
  border-collapse: collapse;
  table-layout: fixed;         // add this 
  word-wrap:break-word;        // add this 
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: mocha should throw error 
Javascript :: read a file nodejs 
Javascript :: how to convert string into blob in javascript 
Javascript :: Program for factorial of a number in javascript 
Javascript :: invert binary tree javascript 
Javascript :: play audio with js 
Javascript :: queue en js 
Javascript :: react is there a safe area view for android 
Javascript :: javascript assign 
Javascript :: Use History React Router v5 app 
Javascript :: array chaing in js 
Javascript :: jquery get selected dropdown item 
Javascript :: json.parse what does it do 
Javascript :: fullcalendar v5 time format am/pm 
Javascript :: js string to node 
Javascript :: object keys javascript 
Javascript :: statusbar height react native 
Javascript :: discord delete messag 
Javascript :: javascript orderby 
Javascript :: how to split text into array javascript 
Javascript :: reverse a string without affecting special characters in javascript 
Javascript :: react useeffect async javascript 
Javascript :: adonis hasone 
Javascript :: Getting Binary gap in JS 
Javascript :: sort string 2d array in javascript 
Javascript :: jquery add remove class timer 
Javascript :: node red admin password setting 
Javascript :: Prevent Double Submit with JavaScript 
Javascript :: set min date field to current date 
Javascript :: how to remove identical string in javascript 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =