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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

zindex not working

Status
Not open for further replies.

zxcdf5je

Programmer
Apr 1, 2005
86
US
hi i am trying to use zindex in my div element but i dont see any difference in my browser.wanted to see if zindex works on iceweasel browser on debian lunux??
is it limited to OS???
 
zxcdf5je, can you post some code? Remember javascript is case sensitive so you need "zIndex" and not "zindex".

Cheers

Nick
 
Just a follow up to this also...

If your using this IN your div element as you have stated above then CSS uses z-index.

Nick
 
nickdel:

i have div element followed by 2 tables.i want this div to be seen over the table elements adn then when the user clicks close then he shud be avle to see the 2 table elements.this is wht i have till now:
<script type="text/javascript">

function hideDiv(obj) {
obj.style.display = "none"
}

</script>
<style type="text/css">

div {
padding:300px;
width:300px;
margin-bottom:10px;

}
#divId{
background:#EEEEEE;

top: 20px;
left: 80px;

}


</style>

<div id="divId"><b>
POs don't always have<br />
shipping locations and proper address is crucial.<br/></b>

<a href="#" onclick="return hideDiv(document.getElementById('divId'))">Close</a>
</div>








<table class="layouttable" style="margin: 4pt;">

<tr><td>
<table class="layouttable" style="margin: 4pt;">
<tr><th rowspan="4" width="80px"<?=($origin_missing?' style="color: red;"':"");?>>Origin</th><td valign="top"><input type="radio" name="post[data][origin]" value="<?=$po_o;?>"<?=$po_o_selected;?>></td><td>The origin from the <?=$this->text_substitution["purchase order"];?> is correct:<br /><?=$this->htmladdress($po_origin);?></td><td rowspan="2" valign="top"><input type="checkbox" name="post[data][set_location_cookie]"<?=($post["data"]["set_location_cookie"]||$cookie_origin?" checked":"");?> style="margin: 6pt;"></td><td rowspan="2" valign="top"><div style="width: 100pt;">Check this box to remember this location for your next visit.</div></td></tr>
<tr><td valign="top"><input type="radio" name="post[data][origin]" value="<?=$u_o;?>"<?=$u_o_selected;?>></td><td>The origin from the <?=$this->text_substitution["purchase order"];?> is incorrect; use alternate location:<br /><?=(intval($alt_origin)?$this->htmladdress($alt_orig_location) . '<br />':"");?><input type="submit" name="post[data][choose_alternate_address]" value="Select Alternate Origin"></td></tr>
<tr><td>&nbsp;</td><td colspan="3"<?=($open_time_missing || $close_time_missing ? ' style="color: red;"' : "");?>>Please enter your regular shipping hours: <?=$otimef->Get_Edit_Html($open_time);?> - <?=$ctimef->Get_Edit_Html($close_time);?></td></tr>
<tr><td colspan="4">&nbsp;</td></tr>

</table>

<table class="layouttable" style="margin: 4pt;">
<tr><th rowspan="3" width="80px"<?=($destination_missing?' style="color: red;"':"");?>>Destination</th><td valign="top"><input type="radio" name="post[data][destination]" value="<?=$po_d;?>"<?=$po_d_selected;?>></td><td>The destination from the <?=$this->text_substitution["purchase order"];?> is correct:<br /><?=$this->htmladdress($po_destination);?></td></tr>
<tr><td valign="top"><input type="radio" name="post[data][destination]" value="<?=$u_d;?>"<?=$u_d_selected;?>></td><td>The destination from the <?=$this->text_substitution["purchase order"];?> is incorrect; use alternate location:<br /><?=(intval($alt_destination)?$this->htmladdress($alt_dest_location) . '<br />':"");?><input type="submit" name="post[data][choose_alternate_address]" value="Select Alternate Destination"></td></tr>
<tr><td colspan="2">&nbsp;</td></tr>
</table>
</td></tr>
<tr><td align="center"><input type="submit" name="post[submit]" value="Submit"></td></tr>
</table>
 
Hi, so let me get this clear... Should your div cover the full page and then when you click close it disappears?

Nick
 
Take this code out:

Code:
div {
   padding:300px;
   width:300px;
   margin-bottom:10px;
   
}
#divId{
    background:#EEEEEE;
    
    top: 20px;
    left: 80px;
    
}

and replace with this:

Code:
#divId{
	position: absolute;
    background:#ccccff;
    width:500px;
    height:100px;
 	top: 20px;
    left: 80px;
    z-index:99;
    display:block;

}

Cheers

Nick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top