-
Notifications
You must be signed in to change notification settings - Fork 297
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Scrollable div table header goes out of box #106
Comments
The floating table header is a copy of the original one. But, with its position set to "fixed". AFAIK, "fixed" elements generally appear over top of the normal flow of elements in a document. So, if the header doesn't fit in the containing div, its hidden part will appear outside of it and will be positioned from the boundaries of the window rather than the scrollable area. The short answer is this probably isn't the best solution for you if you require horizontal scrolling. This is much better optimized for vertical scrolling, and for minimizing the amount of processing done as the user scrolls. There are other solutions out there that absolutely position the table header copy as the users scrolls. But, they're jumpier or they don't reposition the header instantly to give the appearance it really stays in the same place. Now, another solution that could work, but I wouldn't recommend, is to put the table in a separate document and iframe it in. I'm pretty sure the fixed position is relative to the iframe's boundaries and not those of the original window. So, you could do something like having a 500px-wide table in an iframe that is 400px wide. The iframe will be horizontally scrollable, but the added table header will be hidden under the edges of the iframe border and will scroll along with the rest of the iframe's contents. I haven't tried this solution, but it seems it should work. My suggestion is to design around the fact that you should have the full width of the table displayed. |
Looks like this is discussed here as well: #68 |
umm not sure the solution worked. What I did was took it to stackoverflow and a fellow guy helped. Here is the solution |
My pull request #149 fixes the issue . Adding a clipping container fixes the isssue |
If you see your scrollable-div.html demo example. I have reduced the width of the second table so that it has a horizontal scroll.
http://jsfiddle.net/warlockdn/f3w229c9/
On scroll the second table's header comes out of the box and that is not what I need.
What should be done here ?
The text was updated successfully, but these errors were encountered: