299: background-size: cover; and Multiple pages to one CSS case

Fills entire page with image, no white space

<html class="home-bg">

<html class="about-bg">

/* sets base style for each page */
html {
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}

/* set background image per page */
.home-bg {
background: url(images/home-bg.jpg) no-repeat center center fixed;
}
.about-bg {
background: url(images/about.bg.jpg) no-repeat center center fixed;
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s