I'm hoping that someone can explain what's going on; better yet provide
a workaround.
I'm designing a centered CSS site based on a 550 pixel wide vertical
background image. Onto this background I built a two column layout
with nested navigation and content divs. The background image is
centered via "background: ... center;", the divs are centered
over it via "margin: 0 auto 0 auto;".
The problem I'm having in IE6 is inconsistent alignment between
the centered background image and the div centered content above.
Depending on the current browser window size background and div
content are either properly aligned, or misaligned by 1 pixel.
I'm suspecting an even/odd calculation discrepancy between
"background: url("blah.gif") center" and "margin: 0 auto" centering.
Regardless of window size, all div content retain proper relative
alignment. When misaligned, content and background image are off
by 1 pixel across the entire page. I can't really be sure if its the
background or the content that shifts position.
Netscape, Mozilla, and Firefox consistently render proper pixel
perfect alignment between stacked elements irregardless of window
sizing/resizing; IE6 is inconsistent, aligning properly with some
window sizes misaligning by 1 pixel with other sizes.
As I said above, I'm looking for understanding of the problem, and
how to fix it; hopefully without having to tear my design apart.
Below is an example of the basic CSS layout:
------------------------------------------------------------
body {
background: url("bg-vert.gif") #A4AEB8 repeat-y center;
margin: 0;
padding: 0;
}
#container {
margin: 0 auto 0 auto;
padding: 0;
position: relative;
width: 550px;
}
-------------------------------------------------------------
Here's a website that illustrates the problem:
http://www.couloir.org/
Observe the top banner image with different window
sizes.