Forums

Join
bbPress Support ForumsThemesChanging the background image "repeat"

Info

Changing the background image "repeat"

  1. I currently am using a background image for my site that is repeated but I want to change it to something I don't want to repeat.
    I can't seem to find the tag and everytime I try the following in style.css but no success:

    #img.source-image {
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    }

    Any further suggestions would be greatly appreciated,
    RedBull

  2. Better places than here for css advice but this one is easy

    http://www.w3schools.com/css/css_background.asp

    no-repeat is what you want.

  3. That CSS would only change an image that has the id "img" and a class "source-image", i.e.
    <img id="img" class="source-image" src="...etc..." />
    It seems like you're trying to make an image the full size of the page which isn't a sensible solution.

    The style you need to use is
    background: url(theimage.jpg) left top no-repeat;

    and you should probably be applying it to the body
    so

    body
    {
    background: url(theimage.jpg) left top no-repeat;
    }

    and if you want the background to not scroll with the document

    body
    {
    background: url(theimage.jpg) left top no-repeat fixed;
    }

    theimage.jpg must be relative to the style sheet or absolute.

  4. Thanks

  5. You must log in to post.