1

Our school computers use IE8, and there's nothing I can do to upgrade. How can I set this code to work with IE8?

<style type="text/css">
<!--
body {
background-image: url(at4.jpg);
background-repeat: no-repeat;
height: 100%;
     width: 100%;
     background-size: 100%; 
}
 </style>
user2678408
  • 117
  • 1
  • 2
  • 15

2 Answers2

0

background-size is not supported in IE8, you'll need to handle degrading gracefully.

http://caniuse.com/#search=background-size

See IE 8: background-size fix

Community
  • 1
  • 1
Christopher Marshall
  • 10,678
  • 10
  • 55
  • 94
0

Using an img with one of the method detailed here: Perfect Full Page Background Image can be compatible with IE8+ or IE7+.

Otherwise it's not that important if your particular browser doesn't understand this or that (except if it's the most important aspect of your page, but it shouldn't be so for a background image). Progressive enhancement and graceful degradation are cool ;)

FelipeAls
  • 21,711
  • 8
  • 54
  • 74