Jump to content
Sign in to follow this  
cfclol

Background image page id

Recommended Posts

cfclol

Hi Folks Hope someone can help me figure out a perplexing problem. On my site I have a background image for each page (http://www.design309.co.uk) for example the code used for the "about" page is:

.page-id-102 #maincontent .texture {
	background: url(images/about-bk.jpg) no-repeat;
	background-color:none;
	}
Now the same principle applys to all the pages and works fine with the exception og the "blog" page. I added the same code with the correct page id:
.page-id-224 #maincontent .texture {
	background: url(images/about-bk.jpg) no-repeat;
	background:transparent;
	}

Unfortunately it doesn't work. Any ideas about what the difference is and what code I can use to apply the same effect as the other pages? Many thanks

Share this post


Link to post
Share on other sites
catrina

If you're using the same background image for every page, why don't you use Design Control to upload the background image once so that it appears on each page?


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
cfclol

I tried that but I have a different background for the home page and this was my "workaround" (which may or may not be dumb...but I stand to be enlightened) :-)

Share this post


Link to post
Share on other sites
catrina

Try using this selector instead:

.page-id-224 #dynamic-content #maincontent .texture


Please read the docs before posting. Please do not private message me unless I ask you to.

Designer | Catrina Dulay

Founder | Catrina and Mouse

Share this post


Link to post
Share on other sites
cfclol

No dice I'm afraid Catrina. Just wondering what's different about the blog page?

Share this post


Link to post
Share on other sites
cfclol

Anyone else have any ideas? Cheers

Share this post


Link to post
Share on other sites
kastelic

The blog page is dynamically generated and as such does not have a page id associated with it. Where did you get the

.page-id-224
from? Notice that there are always helpful selectors in the body tag, like
.home
,
.archive
.,
.blog
, etc. that you can use. I would use:
.blog #maincontent .texture
, that way you will have the same background on every blog page. If you want a different background for when you click on a post, use
.single

Share this post


Link to post
Share on other sites
cfclol

Thanks Jimmy. I tried your suggestion and it worked like a charm. many thanks

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  

×