CSS for background image

You want to have a background image on the page that stays in its position even when the page is scrolling

body {

  background-image: url(images/background.jpg);
  background-repeat: no-repeat;
  background-position: center;
  background-attachment: fixed;
}

Shorthand CSS would be:

body {
  background:url(images/background.jpg) no-repeat center fixed;
}

Other solutions, fixing the image a certain distance from a side:

body {
  background:url(images/background.jpg) no-repeat 100px 150px fixed;
}

The first number is a measurement off of the left, the second is a measurement off of the top. If you leave one number off, it will assume the measurement is off of the left. You can use center, top, bottom, left or right with a number, like:

body {
  background:url(images/background.jpg) no-repeat 100px top fixed;
}

Which will put the background image 100px off of the left and on the top of the screen.