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: enter image description here

in ie8: enter image description here

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-size feature ie8.

if want use background-size, , need support ie8, last of options best 1 you.


Comments

Popular posts from this blog

c# - Operator '==' incompatible with operand types 'Guid' and 'Guid' using DynamicExpression.ParseLambda<T, bool> -