CSS: How can I get rid of the default window “padding”? An element set to 100% width doesn't reach the window's borders
问题 So I have an element that is placed directly inside body: <body> <div id="header">Some stuff...</div> Other stuff... </body> The following is the CSS used: body{ text-align:center; } #header{ margin:auto; } So the #header div is set to 100% width (default) and is centered. Problem is, there's a "space" between the window border and the #header element... Like: | |----header----| | ^window border ^window border I tried adjusting it with javascript, and it successfully resizes the element to