<thead> displacement within a scrollable block and responsive-table bootstrap
See original GitHub issueWhen using Bootstrap 3 responsive-table
class it helps me when I need to scroll sideways since my table is quite large.
I want to use the StickyTableHeaders
so that I can know which column I am looking at, but when I scroll sideways to the right, the thead
does not follow accordingly, it does not move with the table; it moves much further and leaves a large gap between it and the right side of the table.
The thead
element also leaves the responsive-table
div.
I call the stickyTableHeaders
as follows:
$(document).ready(function()
{
$("#records").tablesorter( {sortList: [[3,1]]} ); // also using TableSorter
$('table').stickyTableHeaders({scrollableArea: $('.table-short')[0]});
}
I have some pictures of what it looks like on my Dropbox. I have not publish my site yet just for neatness sake.
As you can see below.
Issue Analytics
- State:
- Created 6 years ago
- Comments:8
Top Results From Across the Web
Bootstrap 5 - table-responsive - not working (for me)
But this causes the vertial scroll bar (if any) to be displaced to the right of the table. Can someone point me in...
Read more >Overflow - Bootstrap
By design, this content will vertically scroll. This is an example of using .overflow-hidden on an element with set width and height dimensions....
Read more >Bootstrap table thead fix tbody scroll - CodePen
Adding Classes. In CodePen, whatever you write in the HTML editor is what goes within the <body> tags in a basic HTML5 template....
Read more >Bootstrap Snippet Fixed Header Scrolling Table using HTML ...
This wont work with my code because I'm using bootsrap responsive table which has more than 40 columns and it is not working...
Read more >Position Sticky and Table Headers | CSS-Tricks
You can't position: sticky; a <thead> . ... to sticky a parent element like the table header rather than each individual element in...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This worked for me
Here’s my fix. Works really well.