1

I have below script, it's doing fine in firefox and chrome. ie9 doesn't show the change of colors.

<style type="text/css">
body {
background-color: #FF77BB;
}
@media screen and (max-width: 960px) {
body {
background-color: #8A2BE2;
}
}
@media screen and (max-width: 768px) {
body {
background-color: #FF8C00;
}
}
@media screen and (max-width: 550px) {
body {
background-color: #7FFF00;
}
}
@media screen and (max-width: 320px) {
body {
background-color: #CC0011;
}
}
}
</style>
Cœur
  • 37,241
  • 25
  • 195
  • 267
SP10
  • 91
  • 1
  • 2
  • 11

1 Answers1

1

Works fine for me, just get rid of the extra } at the very end, the other browsers may not make it an issue but IE9 is very picky, if one thing is off it breaks the whole thing.

  • Thank you for quick reply, i did that but still not working. Do i need to change any settings..!! addin's...!! – SP10 Aug 30 '12 at 12:42
  • check and make sure you don't have compatibility view on, http://windows.microsoft.com/en-US/windows7/How-to-use-Compatibility-View-in-Internet-Explorer-9 – Mackenzie Carr Aug 30 '12 at 18:01
  • 1
    Yeah, IE is picky. i missed , now it's fine – SP10 Sep 01 '12 at 15:49