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 :: javascript live time 
Javascript :: change attribute 
Javascript :: Appium press Enter on android with js 
Javascript :: how to make directory in javascript 
Javascript :: submit form through jquery by id 
Javascript :: chai expect async throw 
Javascript :: typescript read url parameters 
Javascript :: Javascript how to run hello world 
Javascript :: before send ajax loading 
Javascript :: Emojis should be wrapped in <span, have role="img", and have an accessible description with aria-label or aria-labelledby 
Javascript :: how to make a div scrollable 
Javascript :: node downgrade windows 
Javascript :: check if parameter is array javascript 
Javascript :: internal/modules/cjs/loader.js:905 throw err; 
Javascript :: javascript voice reader 
Javascript :: how to redirect programatically in nextjs 
Javascript :: array sum javascript 
Javascript :: js change opacity 
Javascript :: js regex email 
Javascript :: js detect mobile 
Javascript :: select a form by name jquery 
Javascript :: when do we use scroll listener in javascript 
Javascript :: javascript string into substrings of length 
Javascript :: react chartjs size 
Javascript :: set text of dom element 
Javascript :: cut array up javascript 
Javascript :: separate digits in javascript 
Javascript :: print to console without newline nodejs 
Javascript :: import json javascript 
Javascript :: onMounted 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =