HTML/CSS Div and Background Image

FenoIdeodyMep

New Member
I have a very large image. I want to use this image as the background of my website. I would also like for this image to stretch and fit different browser window sizes.This is the solution I have come up with. (I put it on jFiddle to make it easier for you guys to read).http://jsfiddle.net/sGyax/\[code\].bg{ width: 100%; height: 100%; position: absolute; top: 0; left: 0; z-index: -5000;}<body><div id="background"> <img src="http://stackoverflow.com/questions/15594116/background/001.JPG" class="bg"/></div></body>\[/code\]Is there anyway for me to do this without using IMG tag in my HTML? It interferes with the rest of my layout.
 
Back
Top