Easy way to hard set column width?
Easy way to hard set column width?
javamonkey79
Posts: 2Questions: 0Answers: 0
I'm having issues with sort icons dropping below the text in headers like so:
|Col1 Text | Col2 Text | Col3 Text
It seems as though it is relative to how the col width's are calculated. I set the following properties, yet window resizing still seems to cause this to pop up again:
[code]
"bAutoWidth": false,
"aoColumns" : [
{ sWidth: '90px' },
{ sWidth: '80px' },
{ sWidth: '280px' },
{ sWidth: '300px' },
{ sWidth: '150px' },
{ sWidth: '220px' },
{ sWidth: '230px' },
{ sWidth: '210px' }
]
[/code]
Is there a standard way of fixing this, or am I doing something wrong?
TIA
|Col1 Text | Col2 Text | Col3 Text
It seems as though it is relative to how the col width's are calculated. I set the following properties, yet window resizing still seems to cause this to pop up again:
[code]
"bAutoWidth": false,
"aoColumns" : [
{ sWidth: '90px' },
{ sWidth: '80px' },
{ sWidth: '280px' },
{ sWidth: '300px' },
{ sWidth: '150px' },
{ sWidth: '220px' },
{ sWidth: '230px' },
{ sWidth: '210px' }
]
[/code]
Is there a standard way of fixing this, or am I doing something wrong?
TIA
This discussion has been closed.
Replies
Allan
Have you got the DIV in the TH element relatively positioned like in the demos?
Allan
Wish I could recall the details, but I just wanted to throw this out there so that you would know it's an elusive prey you're hunting. Tables are tough to tame unless every single dimension is hard-coded. And if DataTables updates this at all (I don't really know if it overrides anything, but by default tables (including DataTables) want to be 100% of a containing div).