internet explorer - stretching the background image in IE -
i have background image. stretching fits entire page.but working in browsers other ie.but if use background-size, working in ie9. want work in ie8. how this? in advance.
in other browsers , in ie9: 
in ie8: 
you can find difference @ bottom of page. here code:
body, html{ height:100%; padding:0; margin:0; } body.bodybackground { margin: 0px; background: url(../images/common/header/background_color.png); background-repeat:repeat-x; background-attachment:fixed; background-position:top center; height: 100%; width: 100%; border: 0; background-size:contain; display:inline-block; background-color: transparent; } div.content{ height:100%; width:97%; background-color: rgb(255, 255, 255); margin: 0px 25px 25px 25px; height:470px; background-position:center; background-repeat:no-repeat; background-attachment:fixed; }
ie8 not support background-size property.
you have following options:
use background graphic doesn't need stretching.
provide ie8 different background image (or no background image @ all)
[edit] see my blog post on subject more info on how achieve in pure css no browser hacks.ignore problem , let ie8 users see broken site.
use polyfill script css3pie add
background-sizefeature ie8.
if want use background-size, , need support ie8, last of options best 1 you.
Comments
Post a Comment