scottie5689
21 Apr 2011, 12:06 AM
I am developing a website where my background need to stretch to the fit all windows no matter size or browser. I originally started with CSS3 background-size property. It worked fine but not in IE. I found the IE fix,
<style type="text/css">
html, body {
height: 100%;
margin: 0;
padding: 0;
}
</style>
<img src="bgimage.jpg" alt="background image" id="bg" />
</body>
mg#bg {
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
}
This worked fine when placed in a html page. However, when the image is placed into a PHP page and linked to the CSS it does not work. I get a broken image link box but no image. I have tried it now with png and gif image types. I know HTML and CSS well, not so much PHP.
<style type="text/css">
html, body {
height: 100%;
margin: 0;
padding: 0;
}
</style>
<img src="bgimage.jpg" alt="background image" id="bg" />
</body>
mg#bg {
position:fixed;
top:0;
left:0;
width:100%;
height:100%;
}
This worked fine when placed in a html page. However, when the image is placed into a PHP page and linked to the CSS it does not work. I get a broken image link box but no image. I have tried it now with png and gif image types. I know HTML and CSS well, not so much PHP.