Fixed background in IE resolution -any

On my website, I have to use a background image that is fixed at any resolution and should not change when controlled + scrolling. I used the following css.

/* CSS style */
img.bg {
   /* Set rules to fill background */
   min-height: 100%;
   min-width: 1024px;

   /* Set up proportionate scaling */
   width: 100%;
   height: auto;

   /* Set up positioning */
   position: fixed;
   top: 0;
   left: 0;
  }

  @media screen and (max-width: 1024px){
   img.bg {
    left: 50%;
    margin-left: -512px; }
  }

      

This code works fine in Firefox, but the background image shrinks in IE7 browser . How to fix this problem. Anyone please help

+2


a source to share


2 answers


Not sure, but your minimum width and minimum height may not work for IE. check out this one for the minimum height fix.



0


a source


IE7 behaves a little oddly when it comes to min-width and min-height. To fix this, you can try setting both the width and min-width to the same value for IE7.



0


a source







All Articles