I am using a CSS hack where the image is scaled, but there is a problem.
If the user switches the stylesheet off, the image used as the background is shown, sometimes the image is really huge.
Therefore, I need to hide the background div when there is no stylesheet.
I've thought about dynamically adding the image via JQuery, whilst this works -- it does not take into account whether there is no stylesheet.
How do I switch off images, or the background div when there is no stylesheet?
Thanks.
CSS
background {
width: 100%;
height: auto;
position: absolute;
left: 0px;
top: 0px;
z-index: -1;
}
.stretch {
width:100%;
height:100%;
}
HTML
<div id="background">
<img src="background_1200x800.jpg" class="stretch" alt="" />
</div>