<style>
body, html {<br />
  height: 100%;<br />
  margin: 0;<br />
}</p>
<p>.bg {<br />
  /* The image used */<br />
  background-image: url("image.png");</p>
<p>  /* Full height */<br />
  height: 100%; </p>
<p>  /* Center and scale the image nicely */<br />
  background-position: center;<br />
  background-repeat: no-repeat;<br />
  background-size: cover;<br />
}<br />
</style>
<div class="bg"></div>
This example creates a full page background image. Try to resize the browser window to see how it always will cover the full screen (when scrolled to top), and that it scales nicely on all screen sizes.