I have an empty div which contain a background image that is bigger than the size of the container. I fix this one by background-image
property with the value (100% 100%). That's fine until you open the example in IE8 and IE7. Any solutions for that, even a javascript script or jquery plugin?
i.e: http://jsbin.com/imirer/1/edit
i.e: http://jsfiddle.net/bPTzE/
HTML:
<div class="container">
<div class="background"></div>
</div>
CSS:
.container {
/* an example width for responsive perpose */
width: 500px;
}
.background {
height: 27px;
background: url("http://s18.postimage.org/jhbol7zu1/image.png") no-repeat scroll 100% 100% transparent;
/* not working in IE8 and IE7 */
background-size: 100% 100%;
}
since background-size is CSS3 specific which is not supported to IE you have to do 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
background-size not supported by ie7 and ie8.
the alternative way you can use put 'tag' in div tag and add width 100% to it. It is full scalable.
try this code:
or
html:
css: