• I would like to have one image for the background of the “Home” page, and different for the rest of the site.

    What should the code look like when I edit it to produce this?

    Here is my css:

    body{
    background: url(images/background_port.png) no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    }
    body.home {
    background:url(images/box-edit)no-repeat center center fixed;
    -webkit-background-size: cover;
    -moz-background-size: cover;
    -o-background-size: cover;
    background-size: cover;
    }

    Thanks.

Viewing 1 replies (of 1 total)
  • You’re missing a file extension in this line:

    background:url(images/box-edit)no-repeat center center fixed;

    if it’s a .png, edit to:

    background:url(images/box-edit.png)no-repeat center center fixed;

Viewing 1 replies (of 1 total)
  • The topic ‘Code for differing background images’ is closed to new replies.