Wednesday, 15 August 2012

Previous Interview Question Next Interview Question
Home

CSS 100% Background Image to Cover full Browser Window


Sometimes there is a situation, when we don’t have the right background image to cover whole area of site’s window for all resolutions. Here’s a quick CSS reference to make background image resize to whole screen.
background:#233d4b url(../i/bg.jpg) no-repeat 50% 50% fixed;
background-size: 100% 100%;
-moz-background-size: 100% 100%; /* Firefox 3.6 */
-o-background-size: 100% 100%; /* Opera 9.5 */
-webkit-background-size: 100% 100%;/* Safari 3.0 */
-khtml-background-size: 100% 100%; /* Konqueror 3.5.4 */

Previous Interview Question Next Interview Question
Home

0 comments :

Post a Comment