Header does not scroll sideways in sync with content
See original GitHub issueLet’s say you have a grid. The grid has columns. The last column has width = 100px.
Populate the grid. The grid is bigger than its containing element, so there are horizontal scrollbars. Ensure that the last column contains a very long content. This long content does not have spaces, and very few hyphens. Aka a URL.
Now try scrolling sideways. You will notice that the header does not scroll in tandem with the content, and will end up being misaligned when you scroll sideways to the end.
This is because you didn’t set word-wrap: break-word
. The long URL is considered “unbreakable”. So the column became longer than the header. Scrolling becomes out-of-sync.
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Keeping the horizontal scroll position of a fixed header in sync ...
The body of the table can scroll horizontally and vertically, but the header should always stay on top and only scroll horizontally (to ......
Read more >Grid Scrolling Header Frozen when scroll (does not following ...
Hi,. Im using the ASP MVC Grid and needs the grid to maintain the width incase of overflows (small screen). This is achieveable...
Read more >Fix unwanted horizontal scroll and whitespace with Overflow
Sometimes elements on a page can exist outside the viewport, and an unintended side effect can be horizontal or sideways scrolling that ...
Read more >Well-controlled scrolling with CSS Scroll Snap - web.dev
Avoid using mandatory snapping when target elements are widely spaced apart. This can cause content in between the snap positions to become ...
Read more >Horizontal scroll issues with header - HTML & CSS - SitePoint
You probably do not need the overflow properties in the html element, and applying position:fixed to the header is probably unnecessary. Comment ...
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 Free
Top 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
Issue reproduced here: http://codepen.io/richraid21/pen/vgaXPa
In my case, I put the first column one of type ‘control’ for remove filters, in the case when do not have results.