Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how do I stop page backgrounds from scrolling or repeating?

Discussion in 'Website Design Forum:' started by steve.callen, Feb 19, 2009.

  1. steve.callen

    steve.callen Junior Member

    hi all,

    Please tell me how do I stop page backgrounds from scrolling or repeating?

  2. tim

    tim Senior Member

    CSS required to do it, just place it in wherever.

    body { background-image: url(_img/bg.jpg) background-repeat: no-repeat; background-attachment: fixed; }
  3. Sunburn

    Sunburn Active Member

    Thats not 100% accurate Tim, missing the " ; " off your background-image call :)

    long method ...

    body {     background-image: url('image-file.jpg');     background-repeat: no-repeat;     background-attachment: fixed;}

    Short method .....

    body {background: url(image-file.jpg) no-repeat  0 0 fixed;}
    Hope that helps.
  4. Harry

    Harry Senior Member


    body {background: url(image-file.jpg) no-repeat fixed;} 
  5. Sunburn

    Sunburn Active Member

    he might want to control the position though hence .. 0 0 :)
  6. Harry

    Harry Senior Member

    Touché, touché.
  7. Sunburn

    Sunburn Active Member

    lol! we should write a blog lol
  8. Harry

    Harry Senior Member

    Haha, on the topic of...?
  9. Sunburn

    Sunburn Active Member

    ill pm ya :)
  10. CSparkes

    CSparkes Senior Member

Share This Page