Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to display the div above the main page.

Status
Not open for further replies.

meenu24

Programmer
May 5, 2006
37
US
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
 
I suggest an immediate fix - put the topid div after the other two divs.

Cheers,
Jeff

[tt]Jeff's Blog [!]@[/!] CodeRambler
[/tt]

Make sure your web page and css validates properly against the doctype you have chosen - before you attempt to debug a problem!

FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top