I have two divs. One is the body of my page and the other is the footer of my page. The footer should be 100% of the width, even when resizing the browser window.
My webpage is as follows:

When resizing the browser window, a scroll appears:

If I scroll horizontally, my footer is no longer 100%:

What should I do to ensure that my footer is always 100% wide?
<body> <div id="header"></div> <div id="footer"></div> </body> #header { height: 500px; width: 1100px; margin: 0 auto; background: grey; } #footer { background: #6B191C; position: absolute; left: 0; height: 100px; width: 100%; margin-top: 60px; }
source share