• Resolved RossB

    (@rossb)


    I’m designing a website using a Twenty Twelve child theme. I have set the home page to Static and got it basically how I want it. However, I want some of the pages that are going to be menu items to have different backgrounds from the home page (and each other). I have not been able to figure out how to do this.

    I got as far as using Firebug to identify one of these menu item pages, then adding the following CSS to my style sheet:

    body.page-id-4 {
    background-color: #FF0000 !important;
    }

    It didn’t work. The page retains the same background as the Static home page. (Note: I actually want to use a different background image, not colour, but thought I’d try to get the colour to change first – seems simpler).

    There is a WP plugin that apparently assists in changing backgrounds on a per page/post basis, but I’d rather learn how to do it using CSS. I’m a beginner in this area, so am finding it daunting, but still want to persist until I get it right.

    If anyone is able to assist, would be most appreciative.

    Cheers
    Ross

Viewing 3 replies - 16 through 18 (of 18 total)
  • Thread Starter RossB

    (@rossb)

    OK – thanks a lot, Andrew.

    Cheers
    Ross

    Hi, this thread is very helpful to me because none of the background image plugins have worked with my site for some reason.

    (www.amandacostner.com)

    Anyways, as a total newbie, can you tell me how to figure out the id number of the page who’s background you want to change? I want to try out the code:

    body.page-id-49 {
    background: url(“/wp-content/themes/yourTheme/path-to-image/image.png”) !important;
    }

    But I don’t know what page id to put and I also actually am not sure exactly where to put this code. Should I put it in my child theme’s style css sheet?

    much appreciation thanks

    @bobbielynn2712 – since this thread is marked resolved, can you please start a new one with your question? Thanks.

Viewing 3 replies - 16 through 18 (of 18 total)
  • The topic ‘Twenty Twelve: how to change background on a per/page basis’ is closed to new replies.