View Full Version : Centering Background Vertical Tile Pixel Problem in IE

01-05-2008, 12:26 AM
I've actually come across this problem once before but just ignored it and went forward. But this time it's kinda pissing me off haha.

So here goes.


when viewed in IE sometimes the image I have layers properly over the background image i have tiled vertically in the body tag. HOWEVER when u change the browser size around you will notice that the background will move over to the right 1 pixel. This does not occur in firefox.

What is the deal with this? I really cannot understand. It seems IE has a problem centering the background correctly depending on how many pixels across the browser size is? Has anybody else encountered this? If so is there a fix?

I know it's only 1 pixel but hey I'm a designer and that ONE pixel does make a big difference. LOL

01-05-2008, 02:32 PM
Posting your html code and css would probably help people reply to your post...

01-05-2008, 03:39 PM
Hello edoky145,
I get it too. 1px over.
The first time I looked at this it didn't happen to me so I left. Now I see that I can make it go away just by sizing the browser a little...
So, I even downloaded it and played around with it here locally. I thouht if I got rid of your relative positioning and floated the links in #header it would cure it but it doesn't.

Here is an explanation. (http://www.positioniseverything.net/bg-centering.html)

If you were to put /bg.gif as the background of #container this would not happen but I understand why you want it on the body. For a different full height approach, have a look at this example. (http://nopeople.com/CSS/full-height-layout/)

01-07-2008, 08:16 PM
wow I got it to work. It look a little fiddling but it works. Stupid IE. Eh I guess if it wasn't for microsoft we all wouldn't have jobs eh?

I've tried the full height approach before put I couldn't get the background to extend all the way to the bottom all the time. What I mean is...if you started and the whole page height fit in the browser then it was fine. However if you closed up the window so that you would get a browser scrollbar when u scrolled down the background would disappear.

For ie. www.elliottlabs.com (another one I coded and couldn't get it quite right but I guess the client never noticed haha. )

01-07-2008, 08:25 PM
http://www.aramiinteractive.com/silverspring/demo/test.html is looking better.
You should check the validator.

08-21-2008, 05:15 AM
So is there a reasonable fix for this problem without using the fixes the article Excavator posted? I'd really like to leave my background containers at 100% width so the browser is scalable to the main content area. Any suggestions?

08-21-2008, 05:19 AM
Nope. Its still an issue.