SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    *background-color - what is it for?

    Hi,

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

    Code:
       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

    TIA!

    Andy

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,207
    Mentioned
    456 Post(s)
    Tagged
    8 Thread(s)
    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. )

  3. #3
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Brill thanks - thats what I was hoping to hear

    Cheers

    Andy

  4. #4
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,374
    Mentioned
    180 Post(s)
    Tagged
    6 Thread(s)
    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

  5. #5
    SitePoint Addict
    Join Date
    Sep 2008
    Location
    Rudgwick, UK
    Posts
    377
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    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 This is a brand new site - so I don't have any existing visitors to annoy with that hehe

  6. #6
    Just Blow It bronze trophy
    DaveMaxwell's Avatar
    Join Date
    Nov 1999
    Location
    Mechanicsburg, PA
    Posts
    7,267
    Mentioned
    116 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by ultranerds View Post
    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 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.
    Dave Maxwell - Manage Your Site Team Leader
    My favorite YouTube Video! | Star Wars, Dr Suess Style
    Learn how to be ready for The Forums' Move to Discourse


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •