This is what my html is like:
<div class='header-wrapper'>
<div class='title'>Title</div>
</div>
<div class='some-wide-content'>
</div>
Let's say a browser window is 500 px wide, I want header-wrapper to be also 500px with a color background, title should be centered horizontally within this 500px. While some-wide-content is a big table with width of 1000px. Because of the big table, the body of this page is wider than browser window, so user can scroll this page horizontally. But when they scroll horizontally, I don't want header-wrapper to move, I can't make header-wrapper position: fixed
because it should move vertically with the page.
So, how can I make an element that doesn't scroll horizontally when the page body scroll horizontally?
EDIT: My current solution is to only make some-wide-content scrollable so when user scroll horizontally, they are not scrolling the whole page. But I can't use this solution because I want to scroll the whole page horizontally for some reason.