/ Published in: CSS
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/* Use this markup: */ <div id="background"> <img src="img.jpg" class="stretch" alt="" /> </div> */ with the following css: */ #background { width: 100%; height: 100%; position: absolute; left: 0px; top: 0px; z-index: 0; } .stretch { width:100%; height:100%; }
URL: http://stackoverflow.com/questions/376253/stretch-and-scale-css-background/388817#388817