post icon

How do you Stretch a Background Image in a Web Page?

The best way to stretch an image to fit the background of a page is to use the CSS 3 property, background-size:

body {
background: url(bgimage.jpg) no-repeat;
background-size: 100%;
}

Comments are closed.

Leave a comment