1

I have a css background:

background:url(img/bg.png) center top no-repeat white

It works fine in FF, Safari, and Opera, but Chrome resizes it. The image is 2000px wide, so that it works on all screen resolutions (except those wider than 2000px of course). However when scrunched in Chrome, it looks weird and throws off the design.

Thanks!

  • Is your browser on a zoom level other than 100%? I don't think chrome usually "scrunches" images. – Andrea Apr 25 '12 at 09:58
  • Looks like its a bug which is not fixed yet. http://stackoverflow.com/questions/1237570/chrome-resizing-css-background-url-image – codef0rmer Apr 25 '12 at 10:19
  • I updated Chrome from v16 to v18 and it still compresses the width of the image to match the screen (scrunches) instead of letting the extra width expand out, like all the other browsers. I guess it must be a bug - I can't believe I'll have to redesign my webpage because of a bug in Chrome. =/ – Steve Burke Apr 26 '12 at 08:45
  • Finally figured it out. In Chrome, you have to manually specify the background size when arranging, or it will fill the page with it. – Steve Burke May 01 '12 at 00:52
  • Just in case one needs a sample code: http://stackoverflow.com/a/7660978/851045 – Giraldi Nov 25 '16 at 11:55

1 Answers1

0

Ctrl + 0 should help you out there.

Ole
  • 1,363
  • 12
  • 22
  • 1
    I'm not sure what zooming would have to do with background stretching, but this has no effect - it's already at 100% zoom and the issue is with the background, not the entire page. – Steve Burke Apr 28 '12 at 19:07