Jump to content
Sign in to follow this  
toddatkins

How to do two different background images on the site?

Recommended Posts

toddatkins

Sorry if this has been answered before, I couldn't find it. Ok I've got a total of 26 pages. I need the background on the static homepage (a "feature" page with picture fader) to be, say "background A". All other 25 pages including blog page have "background B". How do I pull that off?

Share this post


Link to post
Share on other sites
toddatkins

Sorry, I am using Platform Pro 1.31

Share this post


Link to post
Share on other sites
kastelic

Each page is unique in that is has a unique class in the 'body' tag. For example, page-id-50 is a class attached to the body of one of my pages.. This will allow you to set backgrounds in the custom css box for each different page.

Share this post


Link to post
Share on other sites
toddatkins

Thanks Jimmy. Would you mind giving me the syntax for that? For example say my page id is 112 and my background image is background-a.jpg -- what is the exact code that I would need to put in to the Custom CSS box (no existing code in there now)? And where would I upload the background-a.jpg file to? Many thanks!

Share this post


Link to post
Share on other sites
toddatkins

If anyone else is going nuts on this like I was, here is what works. I wish those who are helping answer questions would give actual examples of working code. This WORKS:

	.page-id-14 #page {
	background-image: url('/wp-content/uploads/2011/03/headerbg3.jpg');
	background-repeat:repeat-x;
	}
	
You CAN'T just do it like this:
	.page-id-14 {
	background-image: url('/wp-content/uploads/2011/03/headerbg3.jpg');
	background-repeat:repeat-x;
	}
	

You've got to have the #page specifier. ;-)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×