Onclick of a button I am making a Ajax request and displaying the contents in a div in the center of the page. But the problem is the div portion gets displayed behind the main page. How do I solve it. I tried adding a css for the div with higher z-index then the main page. It did not work.
my css code
[CODE red]
.div2
{
position:absolute;
z-index: 20;
}
.div1
{
position:absolute;
z-index: -1;
}
[/code]
my jsp code
[CODE red]
<div id="topid" style="position: absolute; padding:2px; width: 225px; height: 225px; left:0px; top:0px; z-index:3; visibility:hidden;" class="div2">
</div>
<div id="SearchDiv" style="position: absolute; display:block; width:1000px; left: 30px; top: 100px; border:2px ;" class = "div1">
</div>
<div id ="imageDiv" style="position:absolute;left:30px; top:425px;" class = "div1">
</div>
[/code]
I want to display the div with id="topid" on the top of the other two divs.
Thanks
meena
my css code
[CODE red]
.div2
{
position:absolute;
z-index: 20;
}
.div1
{
position:absolute;
z-index: -1;
}
[/code]
my jsp code
[CODE red]
<div id="topid" style="position: absolute; padding:2px; width: 225px; height: 225px; left:0px; top:0px; z-index:3; visibility:hidden;" class="div2">
</div>
<div id="SearchDiv" style="position: absolute; display:block; width:1000px; left: 30px; top: 100px; border:2px ;" class = "div1">
</div>
<div id ="imageDiv" style="position:absolute;left:30px; top:425px;" class = "div1">
</div>
[/code]
I want to display the div with id="topid" on the top of the other two divs.
Thanks
meena