suppose, two div element have id div1,div2 respectively. They present within another div element which id is main.
Their style is below:
#div1 {
width: 200px;
height: 150px;
background-color: #33ff33;
float: left;
}
#div2 {
width: 200px;
height: 150px;
background-color: #999900;
float: right;
z-index: 100;
}
#main {
overflow: hidden;
background-color: black;
width: 200px;
height: 150px;
}
and in body element--
<div id="main">
<div id="div1">
</div>
<div id="div2">
</div>
</div>
problem is div1 comes above div2 and div2 is not shown. Why??? and why div2 don't come above div2???


