Dear Sir,
I have following Codes
<html>
<style type="text/css">
#d1 {float:left;
width:200px;height:200px;
background-color:e3eeff;
margin:20px 20px 20px 20px;
padding:20px 20px 20px 20px;
text-align:center;
vertical-align:middle;
letter-spacing:10pt;}
.bg {width:100%;height:100%;position:absolute;z-index:-1;}
</style>
<body>
<div id="d1"><img class="bg" src="dream.jpg" width=100 height=100%><h2>Hello world</h2></div>
</body>
</html>
I want to know
Why background image goes outside of div?
I want to result shown in attached file.
Please help