I'm trying to make a background stretch the entire body (width only). This works only on Chrome,Opera and Firefox. How can I make this work on IE too? O_o
background-size:100%;
-moz-background-size: auto 100%;
-o-background-size: auto 100%;
I'm trying to make a background stretch the entire body (width only). This works only on Chrome,Opera and Firefox. How can I make this work on IE too? O_o
background-size:100%;
-moz-background-size: auto 100%;
-o-background-size: auto 100%;
since background-size is CSS3 specific your gonna have to use something like this for it to work in IE
set your html and body to
wrap the image you want fullscreened with a div #page-background
then put this in your html file
** you will have to use some sort of reset to remove the margins and paddings, something like this
I created jquery.backgroundSize.js: a 1.5K jquery plugin that can be used as a IE8 fallback for "cover" and "contain" values. Have a look at the demo.
background-size is not supported in IE for versions under 9. A cross browser solution is to use a jquery plugin like fullscreenr.