Grow your CSS skills. Land your dream job.

2 backgrounds css

  • # June 3, 2011 at 4:26 pm

    Howdy,

    I’m trying to use this syntax which it’s works in FF :


    background:url(images/bg.jpg) no-repeat top, url(images/bg2.jpg) repeat;

    But doesn’t seem to work in IE,
    Any suggestions?

    # June 3, 2011 at 4:33 pm

    Only IE9 supports multiple background images (CSS3). If you aren’t using Modernizr, you should be because it allows you to detect, then implement a fallback method for browsers that don’t support CSS3.

    # June 3, 2011 at 4:39 pm

    Didn’t understand exactly how it works…

    # June 20, 2011 at 2:03 pm

    It doesn’t seem simple as i’m asking…
    I just need a simple code to load 2 backgrounds like this one:

    background:url(images/bg.jpg) no-repeat top, url(images/bg2.jpg) repeat; 

    Just need to figure out how can i make this work on IE7 or earlier versions..

    Please Help…

    # June 20, 2011 at 7:01 pm

    @chriscoyier and @Mottie had the best solutions. I would recommend trying those and asking for help if you get stuck.

    # June 21, 2011 at 4:22 am

    @intodesign That’s because it isn’t simple. Internet Explorer earlier than version 9 does not support multiple backgrounds purely using CSS. You have to either stick with one background, use Chris’ pseudo elements suggestion or find a JavaScript solution

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

You must be logged in to reply to this topic.

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