This question addresses the problem that was found in one of the proposed solutions in response to another question: Rubber imposition: the empty space on the right .
The task is rather mediocre: to make a rubber layout with the width of the target content, say, 1024px. It should be centered when expanding the window.
In the previous question, a code was proposed that allows you to stretch the header , main and footer across the width of the screen. I added centering blocks to this code, in which, in fact, the target content will be located ( link to the code ). This is how it will look like (I drew a center translucent):
And everything would be great, but there is one defect. If you narrow the window to a size less than 1024px, and then scroll the scrollbar, then it turns out that the right border header, main and footer will be under centering. You can see this effect in the code I give .
The question is obvious: how to remove this defect?
