Posts tagged with “IE6” and “HTML”
CSS Resizable "Background" Image Technique
Resize this page. The background will remain the same width as the window. The technique uses an actual image tag and its own fixed position div wrapper to pull off the effect. This will probably make semantic-web nazis' heads explode, but at least it doesn't use tables. The image will remain at the top of the page however, so having the image end in a single color at the bottom, matched by a similar color for the body background would probably finish this off quite nicely. If you need the image to center, use the tables technique linked above. Here's the basic CSS to pull this off in IE7, IE8, Firefox, Safari, Opera and Chrome:
And this is all the HTML you need to add to the top of the page (above any "wrapper" div you may be using):
<img id="bgimg" src="[URL_TO_YOUR_IMAGE]"
alt="background image" width="0" />
To find out how to make this work in IE6, look at the source code of The Demo page