No this isn't specifically an overflow-x: auto problem. It is is caused by elements with width: 100% interacting with fixed width elements elsewhere on the page. In the case of SO's #footer
, it is width: 100% (implicitly), whereas the #content
is declared width: 960px.
When the page width shrinks below 960px, the #content
's width forces the browser to add a horizontal scrollbar (implicit overflow-x: auto). Since the #footer
is set to 100% width, it only expands to 100% of the viewport, and the section beyond the scrollbar doesn't get the background color properly added.
To fix this, you can add a min-width declaration to the css:
#footer {
min-width: 960px;
/* other css goes m'ere */
}
Pat
2010-08-15 00:43:58