My background image appears centered, but Chrome displays it offset by one pixel.
CSS
#container {
background: url("images/header.jpg") no-repeat scroll 50% transparent;
width: 100%
}
#header {
width: 986px;
margin: 100px auto 0 auto;
}
HTML
<html>
<body>
<div id="container">
<div id="header">centered content</div>
</div>
</body>
</html>
It seems to be related to how different browsers handle the center
or 50%
property of the background
in CSS:
Are there any known (simple) hacks or alternative methods to fix this? The background container must remain 100% wide.