Thead resizes when i use it as an affix
Thead resizes when i use it as an affix
I have a datatable which has a lot of registries, and am trying to make the THEAD an affix so when people scroll down they can see the tittle of each column, i already have achieved this, but for some reason when the thead starts moving down it resizes small and it doesnt seem like part of the table.
Is this a problem with the datatable?
Pictures:
Normal DataTable:
http://imgur.com/UDcXgyt
Anormal DataTable:
http://imgur.com/868w94G
This question has an accepted answers - jump to answer
Answers
We'd need a link to a test case showing the issue to be able to offer any help.
Allan
Hello allan,
Thank you for your comment, i made a small demo case,
https://jsfiddle.net/1u1zL4v3/
When you scroll down on the demo you will see that the headers start to shrink or make smaller, but when you go back top it goes back to normal, will i have to make a javascript with each td to get the size of it and set it to each td on the thead?
I don't actually see how the table is being initialised by DataTables, or how the thead is being fixed to the top of the window. The extension to do that in DataTables is FixedHeader, but that doesn't appear to be included on the page.
Can you clarify how the table is being constructed by DataTables given that there is no Javascript being used in the Fiddle.
Allan
Thank you for your reply Allan,
I was trying to do fixed header manually making it an affix from bootstrap,
thanks to your reply you pointed me into the right direction and used the FixedHeader extension.
Thank you very much.