views:

41

answers:

6

Is there anyway to make the sky/lake background stay still while you scroll?

Site: http://bit.ly/agJiEy

+3  A: 

In CSS:

background-attachment: fixed

http://www.w3schools.com/css/tryit.asp?filename=trycss_background-attachment

Jerome
A: 

background-attachment

Sjoerd
A: 
body{
    background-image:url('lake.jpg'); /* or whatever */
    background-attachment:fixed;
}
BioBuckyBall
A: 

Try

background-attachment:fixed;
Marc B
A: 

Or in shorthand:

body {background: url("/images/myimage.png") no-repeat fixed top left;}
Joseph Silvashy
A: 

In that site, change this line

<div><img src="images/bottom_bg.jpg" width="100%" alt="" /></div>

to

<div id="foobar"><img src="images/bottom_bg.jpg" width="100%" alt="" /></div>

And add the following CSS:

<style>
#foobar{ position: fixed; bottom: 0px; width: 100%; }
</style>

That should do the work.

fcingolani