Picnic Website Code Tutorials

CSS3 Full Size Background Image Tutorial


View Demo

We can do this with CSS3 thanks to the background-size property. We use the html element as it's always at least the height of the browser window. We set a fixed and centered background on it, and use background-size cover. "Background-size cover" scales the background image to be as large as possible so that the background area is completely covered by the background image. Some parts of the background image may not be in view within the background positioning area depending on the screen size.

The CSS3

html {
background:url(skybg.jpg) no-repeat center center fixed;

Need help adding this or other code to your website? Post it here in the forum! Forum


Top Donators

Friends of Mine