Centered Background CSS

Centered Background CSS

The code below can be used to set an image in the background that will stretch and fit the width of various computer monitor sizes.

background: url("../images/bg.jpg") no-repeat scroll center top #FFFFFF;
    height: 200px;
    position: absolute;
    top: 0;
    width: 100%;

Larger images like 2100 x 500 help insure the centered look look good in all monitors.