HTML Table - Always Visible Header
Solved
Coutcout86
Posted messages
219
Status
Member
-
nichola Posted messages 113 Status Member -
nichola Posted messages 113 Status Member -
Bonjour,
I am not sure if my title is clear enough, so I will elaborate on my question.
I created an HTML table with a header (thead in particular) and I have content in my tbody.
However, there are countless data in my table, and when I scroll down, I can no longer see my header. So I tried CSS, the overflow property, but it doesn't work as I wish.
I wanted to know if there was a way to make the header appear once it is no longer visible when I scroll (using JavaScript, jQuery, etc.)?
To provide a concrete example (and for those who have Facebook), when you go to your profile and scroll to see your news feed, there is a small bar that appears.
Could someone help me solve this problem?
Thank you in advance.
I am not sure if my title is clear enough, so I will elaborate on my question.
I created an HTML table with a header (thead in particular) and I have content in my tbody.
However, there are countless data in my table, and when I scroll down, I can no longer see my header. So I tried CSS, the overflow property, but it doesn't work as I wish.
I wanted to know if there was a way to make the header appear once it is no longer visible when I scroll (using JavaScript, jQuery, etc.)?
To provide a concrete example (and for those who have Facebook), when you go to your profile and scroll to see your news feed, there is a small bar that appears.
Could someone help me solve this problem?
Thank you in advance.
1 answer
-
-
-
If we base ourselves on the source of the example on the site:
$('#tableBlock > table.myTable').fixedHeaderTable({ height: '600', altClass: 'odd', footer: hasFooter, cloneHeadToFoot: hasClone, fixedColumn: hasFixedColumn, themeClass: 'fancyTable' });
This is the CSS selector for the table, so it could be $('table') if you have a single table, or any class that is applied to your table.
-