Columns don't fit to header - datatables with Scroller plugin
Columns don't fit to header - datatables with Scroller plugin
dacesilian
Posts: 3Questions: 0Answers: 0
I'm using Datatables with Scroller plugin and server-side loading. When data are loaded, header columns are resized and often (not always) don't fit to inside columns.
Picture of a situation - http://i.stack.imgur.com/J3zMz.png .
Relevant datatables setting code:
[code]
"sScrollY" : window.innerHeight - 270,
"bServerSide" : true,
"sDom" : "frtiS",
"bProcessing" : true,
"bDeferRender" : true,
"bAutoWidth" : true,
"oScroller" : {
"rowHeight" : 33,
"autoHeight" : false,
"serverWait" : 100
},
[/code]
Is there any way how force header columns to always fit the content (and vice versa)?
Thanks.
Picture of a situation - http://i.stack.imgur.com/J3zMz.png .
Relevant datatables setting code:
[code]
"sScrollY" : window.innerHeight - 270,
"bServerSide" : true,
"sDom" : "frtiS",
"bProcessing" : true,
"bDeferRender" : true,
"bAutoWidth" : true,
"oScroller" : {
"rowHeight" : 33,
"autoHeight" : false,
"serverWait" : 100
},
[/code]
Is there any way how force header columns to always fit the content (and vice versa)?
Thanks.
This discussion has been closed.
Replies
Allan
It was caused by this CSS padding:
table.display thead th {
padding: 3px 18px 3px 10px;
When I remove this (horizontal) padding, columns are okay.