Geeky web tip - 1 pixel shift of background image
Recently while coding a client’s site, I had an issue with a background image being misaligned by just one pixel. It was only happening in Safari. I tried a number of things and finally resorted to a CSS hack for Safari.
Today I found the shift also happened in Firefox 3. Doh!
Fortunately a discussion of rounding errors in Firefox got me to wondering about the size of the background image. Well, it was an odd number of pixels wide. Increasing the width of the image by one pixel fixed the bug in both FF3 and Safari. Bye-bye hack! Dunno why I didn’t think to check that before.
Posted: September 1st, 2008 under Design, Web Tips.
Comments: none
Next post: Gmail Tweaks »


Write a comment