Here\'s the CSS , and I want the background picture not to be displayed in IE . Instead I just want the background color to be displayed. How do I do that?
h
There is obviously multiple ways to answer this question, some good methods already mentioned. Here is another method that I use most often and it requires less bytes:
To target only Internet Explorer, put an "*" in front of the code that you want to target for I.E. Using your example above, for the background to not appear in I.E. use the * like so:
html, body {
margin:0;
padding: 0;
background: #a9ac41;
*background-image: none;
background-image: url("background.png");
background-repeat: no-repeat;
background-size: cover;
margin:0;
If and when it doesn't work, likely your rules are conflicting. In such cases, use "!important", like so:
*background-image: none !important;