question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Header does not scroll sideways in sync with content

See original GitHub issue

Let’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:open
  • Created 7 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
richraid21commented, Feb 6, 2017
0reactions
coballacommented, Sep 8, 2017

In my case, I put the first column one of type ‘control’ for remove filters, in the case when do not have results.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found