The border at the top of the page, and the footer at the bottom, should extend the full width of the browser or device. With the overall width of the div.container decreased (by reducing the padding from 20px to 2px), the overall width of the div.container is 964px and the spaces no longer exist.