alisamii
05-18-2011, 04:24 PM
Hi:
I am having trouble implementing a background image using CSS for compatibility with IE7, and if possible, IE6.
In my CSS, I have the following code defined
body{
margin:0px;
height:100%;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: black;
background-color:#fff;
background-image: url(../images/bg.png);
background-repeat: no-repeat;
background-attachment: scroll;
background-position: absolute;
background-size: 100%;
}
/*
body{
margin:0px;
height:100%;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: black;
background: #fff url(../images/bg.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
*/
The results work fine in Chrome, Safari and Firefox on both PC and Mac. However, the image does not scale and gets cropped in IE7.
I have tried it two different ways, both of which are in the code, and one of which is commented out. Neither way works properly with IE7.
Does anyone have a solution to this that they could share with me.
Thanks.
I am having trouble implementing a background image using CSS for compatibility with IE7, and if possible, IE6.
In my CSS, I have the following code defined
body{
margin:0px;
height:100%;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: black;
background-color:#fff;
background-image: url(../images/bg.png);
background-repeat: no-repeat;
background-attachment: scroll;
background-position: absolute;
background-size: 100%;
}
/*
body{
margin:0px;
height:100%;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: black;
background: #fff url(../images/bg.png) no-repeat center center fixed;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}
*/
The results work fine in Chrome, Safari and Firefox on both PC and Mac. However, the image does not scale and gets cropped in IE7.
I have tried it two different ways, both of which are in the code, and one of which is commented out. Neither way works properly with IE7.
Does anyone have a solution to this that they could share with me.
Thanks.