0
body {
    background: #f6f6f6 url(http://path.to.image/body-bg.gif) repeat-x;
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    line-height: 1.5;
}

works in everything but ie7.

what's wrong here?

NullVoxPopuli
  • 61,906
  • 73
  • 206
  • 352

2 Answers2

0

url(/body-bg.gif) is skipped by ie7 use url(body-bg.gif) instead!

Tim
  • 9,351
  • 1
  • 32
  • 48
  • well, its actually an absolute path, including the http:// and everything, I just didn't want to put it up here. – NullVoxPopuli Aug 31 '10 at 15:35
  • in case you're wondering, partial paths are relative to the location of the CSS, not the HTML that is using it. So you can safely refer to the image with ../etc/body-bg.gif and use it on any HTML even in subdirectories. – Lou Franco Aug 31 '10 at 15:37
  • hmm strange, did you try splitsing them in seperate 'tags' (dont know if tags are the correct name) I mean like background-color:#f6f6f6;background-image:url(http://path.to.image/body-bg.gif);background-repeat:repeat-x; ? – Tim Aug 31 '10 at 15:38
  • Tim is close, see http://www.webcredible.co.uk/user-friendly-resources/css/internet-explorer.shtml 3. Disappearing background images – Mikey1980 Aug 31 '10 at 15:39
  • I know this is 3 years old, but why did this get marked as the correct answer when your final comment was that it didn't work? – e-on Jul 24 '13 at 13:18
0

Maybe the line-height is causing the issue, try taking it out. Also, try body { height:1%; }

shahidaltaf
  • 585
  • 1
  • 5
  • 17