Bryan Garnett-Law wrote: > I am experiencing a problem with a site I am developing which relies upon a > centred background image (750 x 1, repeat-y). When I place the banner > graphic atop this background IE renders incorrectly with the image appearing > to be 1 pixel left of where it should be. > > Am I coding it wrongly (XHTML / CSS below)? Or is there a hack I need to > use?
Bryan, this is being caused by the use of two different centering mechanisms that you are then needing to have exactly cover each other. I had originally thought that this was an IE bug, but when I created a clean test page i found that all browsers can have problems in this area. http://users.redrivernet.com/cssjunkie/temp/bg-bug.html Try dragging the window narrower and wider. See the tiny flickering on the ends of the grey boxes? Now do the same in other browsers. the flicker pattern is different, but flickering still occurs. These flickers are 1px errors that are hard to prevent in some cases, due to considerations of screen rendering and the need to sometimes round off caluclations. The answer for you is to stop asking the browser to line up things it can't always line up. Instead, you need to find a way to put your BG image in the same centered wrapper, or you might possibly fudge off 1px somewhere so no one notices when the error happens. BTW, I have been meaning to make this into a full PIE demo, but I can't seem to find the time! Alas. Big John ===== -- Perennial student + Impractical joker + CSS junkie = Big John <http://www.positioniseverything.net> __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ****************************************************** The discussion list for http://webstandardsgroup.org/ See http://webstandardsgroup.org/mail/guidelines.cfm for some hints on posting to the list & getting help ******************************************************