Making a rubber layout, set the minimum width of the body and made it so that the heder and footer stretched across the width of the window, and all the content between the mini-center:
body{ ... min-width: 1024px; ... } header, footer{ ... width: 100%; ... } main{ ... width: 1024px; margin: 0 auto; ... } Firstly, such a solution did not lead to the fact that at 1024px there is no horizontal scroll bar: they disappear only somewhere at 1260px.
If the initial screen size is less than 1260px scroll to the left, then to the right will be empty space, as shown in the figure below:
My questions are:
- How to remove a scrollbar with window widths up to 1024px?
- How to remove empty space for any window width?

bodymin-width: 1024px. The scrollbar appears because the minimum width is set. 2. Without your code it is difficult to understand what could be the problem. How to create a minimal, self-sufficient and reproducible example - stackanonbodymin-width: 1024pxjsfiddle.net/jg6cu877 . Scrollbar to 1024px still appears due tomainwidth: 1024px;. - stackanon