Full page background in CSS

I was looking for a simple solution to give a full screen background without using flash or javascript, Whatever solution I found must have met the following criteria.

  • Fills entire page with image
  • Scale the image if needed
  • Center the image on the page
  • As cross-browser compatible as possible
The solution I came up with was as follows.