CSS3 PIE Forums
http://css3pie.com/forum/

Can Never Get Multiple Backgrounds Working
http://css3pie.com/forum/viewtopic.php?f=3&t=1667
Page 1 of 1

Author:  pealo86 [ Sun May 20, 2012 10:04 am ]
Post subject:  Can Never Get Multiple Backgrounds Working

I must be doing something wrong, because I can never seem to get this to work with PIE!

If you look at the following page:
http://www.concept.mattpealing.co.uk/bh ... mepage.htm

I'm using the following code to specify multiple backgrounds:
Code:
.post-homepage {
   background: url('../image/body-01.gif') repeat-x, url('../image/body-02.gif');
   -pie-background: url('../image/body-01.gif') repeat-x, url('../image/body-02.gif');
}


And I'm using the js version of PIE, like so:
Code:
$(document).ready(function() {
    if (window.PIE) {
        $('.button-01, .button-02, #nav .dropdown nav, .banner, #premises img, .post-homepage, .post-internal').each(function() {
            PIE.attach(this);
        });
    }
});


However if you look at the page in the link above, you can see the <body> element is just plain white in IE, whereas it should have 2 background images applied to it.

Can anyone see what I'm doing wrong?

Author:  jason [ Sun May 20, 2012 12:43 pm ]
Post subject:  Re: Can Never Get Multiple Backgrounds Working

Moved to troubleshooting forum.

Relative path issue perhaps? Remember the image urls are resolved relative to the HTML file. http://css3pie.com/documentation/known- ... tive-paths

Author:  webaware [ Thu May 24, 2012 2:06 am ]
Post subject:  Re: Can Never Get Multiple Backgrounds Working

There is a JavaScript error on the page, generated by the script dropdown.js; get rid of your JavaScript errors first, then if it still doesn't work, ask us to look again.

Author:  pealo86 [ Thu May 24, 2012 2:34 am ]
Post subject:  Re: Can Never Get Multiple Backgrounds Working

Thanks for the tips, tried both of your suggestions and now it appears to be fixed!

Author:  pealo86 [ Thu May 24, 2012 3:16 am ]
Post subject:  Re: Can Never Get Multiple Backgrounds Working

Hmmm after trying the fixes on my WordPress installation I seem to be having problems with relative paths. I've tried the following:

wp-content/... etc
/wp-content/... etc
./wp-content/... etc
../wp-content/... etc

Which don't seem to work. However there were a few times where the backgrounds appeared to show! But only intermittently. I'm not sure what exactly I was doing different each time.

However in the end I've had to go with absolute paths.

Has anyone else had problems with WP?

Author:  Tonttu [ Thu May 24, 2012 3:28 pm ]
Post subject:  Re: Can Never Get Multiple Backgrounds Working

Did you try WP PIE plugin: http://wordpress.org/extend/plugins/wp-pie/

Author:  pealo86 [ Sat May 26, 2012 10:07 am ]
Post subject:  Re: Can Never Get Multiple Backgrounds Working

Oooh I didn't know that existed, thanks :D

Author:  THEMEreactor [ Fri Jun 01, 2012 1:46 pm ]
Post subject:  Re: Can Never Get Multiple Backgrounds Working

We haven't actually tested the plugin on multiple backgrounds, but I should see no reason it wouldn't work so long as the style is picked up by the regex we're using. If you have any problems with it, or suggestions on how to add that functionality, please let us know and we'd be happy to try and work it in.

Page 1 of 1 All times are UTC - 7 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/