*background-color - what is it for?


I’m trying to clean out my CSS file, and bootstrap / font awesome have a load of stuff like:

   color: #FFFFFF;
   background-color: #995E63;
   *background-color: #003bb3;

What is the *background-color for? I’ve tried googling it, but can’t seem to find anything (I’m just wondering if its safe to remove)

The site is designed to only work with IE9 and more (and FF/Chrome/Safari), but just wanna make sure I’m not gonna break it for any of those by removing it :slight_smile:



IE6 and 7 will recognize the second declaration, so it’s targeted at them. The other browsers will ignore it. So if IE < 8 is not an issue, then just remove that stuff. No fairies will die or anything. (Indeed, they will prolly rejoice. :slight_smile: )

Brill thanks - thats what I was hoping to hear :slight_smile:



If you are supporting IE7 and under then the thing you have to be careful of is when the “*propertyname” is over-riding a rule that IE6 and 7 don’t understand and removing the rule would leave the original rules in place which would then break IE7 and under.

In your snippet above its just changing one background color for another so it may be a fallback for ie7/6 where other browsers may be getting transparency, text-shadow or something else that could render text invisible in IE7 and under (e.g. if you have white text with a black text shadow you will just get white text on a white background in ie7 and under and see nothing :slight_smile:

Thanks for the reply. I’m actually just gonna bring up an alert for people using < IE9, and tell them to get a “decent” browser :wink: This is a brand new site - so I don’t have any existing visitors to annoy with that hehe

It may be a brand new site, but that doesn’t mean your users and/or target audience are ABLE to get a “decent” browser - workplace rules may preclude some one from going above IE8 (the company I used to work for is still using XP and is planning on doing so for a couple more years yet) or installing an alternate browser (another organization has security sweeps running regularly which removed all but the “standard” installs.

A better approach is just to give them a “dumbed down” version of the site which may not be as pretty, but is still functional.