While creating an HTML5 page, I observed that div elements without specified widths within sections like "header" and "footer" only occupy the width of the window. For instance:
<header>
<div id="header-background" style="background: #ddd">
<h1 style="width:960px">Hello World</h1>
</div>
</header>
If you resize the window to below 960px (e.g. 600px) and scroll horizontally, the "header-background" will only expand to 600px, leaving white space on the right side.
This behavior is visible on websites like stackoverflow.com as well.
Is there a way to solve this issue?