Grow your CSS skills. Land your dream job.

Background Fallback

  • # December 18, 2012 at 9:17 pm

    Hi, I’m considering background fallbacks for browsers that don’t like rgba yet. Is this ok? It worked in IE8(Browser Mode through IE10) but I dunno…seems like it could fail…


    body {
    background: orange;
    background: rgba(255, 165, 0, 0.5);
    }

    *EDIT* A quick search gave me this http://css-tricks.com/rgba-browser-support/ but that was 2010…what are the latest opinions. :)

    # December 18, 2012 at 10:04 pm

    Should be fine, I do similar stuff for buttons that have linear gradients. So just a fixed colour fall back.

    Basically anything older browsers don’t understand they ignore (as a rule of thumb), so browsers that don’t understand rgba will just skip it meaning the original remains in place.

    Browsers that do understand will read the first, then the second and use the second because of the cascade. (Reads the stylesheet top to bottom).

    # December 19, 2012 at 2:39 pm

    Good to know. Thanks.

    # December 19, 2012 at 3:01 pm

    Just remembered @chriscoyier did an article on RGBA support a while back – http://css-tricks.com/rgba-browser-support/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".