Empty headers when using scrollY
Empty headers when using scrollY
johnvarney
Posts: 3Questions: 2Answers: 0
I am supplying column headers with 'title' values in columns data with no headers or body defined in the HTML. All works fine but when I use scrollY to define a fixed table height, another row of headers is added with no title text under the data defined headers.
A similar issue occurs when using FixedHeaders.
Any thoughts as to why this happens?
This discussion has been closed.
Answers
If you use scrollY, then Datatables clones the header row into a new table above the main table, so it'll stay visible when the user scrolls. The original row should be hidden with a height of 0. If it is still showing up in some way, then you may need to tweak your CSS.
I checked and the additional header is set to a height of 0 but the header row is still visible. The 0 height is the value on the CSS and is not being overridden by other CSS settings. Any Ideas?
If the original row is still visible when it has a height of 0, then you could have 'overflow: visible' set on it. Try using Firefox/Firebug to examine it, and play about with the CSS to investigate what is going wrong. Not much else I can think to suggest without an live example of your problem to look at.