size

How to make a background image fit the whole window using CSS?

The following piece of code will solve the problem:

body{
background: url(‘../images/black_bg.png’) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
-ms-background-size: cover;
background-size: cover;
}

Cheers,

SZ

Advertisements