Support » Themes and Templates » Having different image behind page content on each page

  • jhultquist14

    (@jhultquist14)


    Hi all. I’m pretty new to wp and am building a child site using the twenty twelve theme. i have figured out how to do most of the changes that i want but i can’t figure out how to have a different image behind the content on different pages. not the background image, i know how to change that, but the body background.

    i have this code in my css file

    body .site {

    background-image:url(‘main_background.jpg’);
    padding: 0px;
    margin-top: 0px;
    margin-bottom: 0px;
    box-shadow: 0 0px 0px rgba(0, 0, 0, 0);
    }
    which shows that image on all pages but i only want that on the home page and different image on all the rest. All of my pages are static info.

    i know there are probably 3 different ways to do it but i keep getting stuck!

    Any help would be much appreciated,
    Josh

Viewing 2 replies - 1 through 2 (of 2 total)
  • WPyogi

    (@wpyogi)


    Forum Moderator


    You can use the unique home page class generated in the body tag to target just the home page:

    body.home .site { ... }

    jhultquist14

    (@jhultquist14)


    thanks for the reply!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Having different image behind page content on each page’ is closed to new replies.