Style background on body doesn't appear

Well guys, I’m trying to put two backgrounds on the site, a specific index and one for the other pages.
I have looked and saw a solution:

Place an id in the body and the CSS reference that id.

Well, okay so my code:

body {background: url (images/bg-topo.png) repeat-x;}
body#index {background: url (images/bg-corpo.png) repeat;}

Only I’m using Wordpress, taking the header and dynamicist blabla as you know. So I can not reference a body for each page.

I wonder how can I solve this problem :stuck_out_tongue:

Who wants to take a look:, click on the A Empresa and the page index.

You don’t have the CSS rules you posted above in your stylesheet which is why it’s not working. :slight_smile:

In your stylesheet you have this:

body#index{background: url(imagem/bg-topo.png) repeat-x;}
html {background: url(imagem/bg-corpo.png) repeat;}

Still not working @kohoutek. I copied and pasted your code.

I still see the same old code:

Oh, I thought it was to copy the style you put it.
Can you explain, better?

Whats CSS rules you said?

Someone? :frowning:

I think kohoutek’s point is that you have typos in the code on your site. On the two lines in question, your code reads imagem, when it should read images, as you’ve stated in your post.

What I’m trying to tell you is that you do not have the code you posted in your first post in your stylesheet, hence why it can’t work. I pasted the code that you currently use in your stylesheet and they are entirely different from the code you posted in your first post. Copy and paste the code you posted here (in your first post) into style.css and you should be good to go, unless I’m misunderstanding something.

Err… the translator must have translated, but it says “imagem”.

It’s the same code. Each modification that I changed I upload on the server at the same time

I see you now added the correct CSS rules to your stylesheet.

What you’d need to do now is have a reference to the #index ID exclusively.

To do that, you need to work with a conditional function.

In your header.php, go to the opening body tag and do something like this:

<body <?php if (is_home()) { ?>id="index"<?php } ?>>

This should read, “if it’s the homepage, append an id of index”.

Is that what you meant?

Yes! Thank you.
This tag in php, is there a specific name? Only works with elements of global style?

Well, it’s a conditional tag, more specifically, a WordPress conditional tag. You can do loads with it. For more information, please see this page.

Thanks kohoutek.
Problem solved.