A029G13

Background Size

CSS3 allows you to control the background size on your web page.

In order to cover the entire web page, you will use the background-size property and set it to cover.

Guide:

html
{
background: url(images/background.jpg);
background-repeat:no-repeat;
background-position: center center;
background-attachment: fixed;
background-size: cover;
}

Background Size - Resizing background images to fit (scalable)

Objective:

Create a web page using a scaling background image (to fit an element)

html
{
background: url(images/background.jpg);
background-repeat: no-repeat;
background-position: center center;
background-attachment: fixed;
background-size: cover;
}

If you want to position an element at the bottom, use height:100%; on the html element.

Email me at:Mguti-s163@chusd.org