• 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?


tim

Senior Member
#2
CSS required to do it, just place it in wherever.

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

Sunburn

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

long method ...

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

Short method .....

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