WordPress.org

Ready to get started?Download WordPress

Forums

Image as background w/o tiling (3 posts)

  1. lgordonb
    Member
    Posted 3 years ago #

    I am experimenting with transitioning my website to WordPress; I would like to use an image I created as the background, but I do not the image to be tiled. I know I will probably need to change the CSS code for this to happen. I just need to know how. Can anyone help with this. I am using the Weaver/ Twenty-ten theme.

    Thanks!

  2. lgordonb
    Member
    Posted 3 years ago #

    I meant to say, "I do not want the image to be tiled..."

  3. Michelle Langston
    Theme Wrangler at Automattic
    Posted 3 years ago #

    You'd have something like this:

    body {
    background: url('path/to/your/image/filename.png') no-repeat #fff;
    }

    Obviously change the path and filename to match your image. And since you're not tiling the background, you should specify a fall-back background color.

    If you want the background to be fixed when the user scrolls, you can add background-attachment: fixed, like this:

    body {
    background: url('path/to/your/image/filename.png') no-repeat #fff;
    background-attachment: fixed;
    }

Topic Closed

This topic has been closed to new replies.

About this Topic