| View previous topic :: View next topic |
| Author |
Message |
nagasree
Joined: 21 Sep 2004 Posts: 81 Location: Hyderabad, India
|
Posted: Thu Apr 21, 2005 5:26 am Hiding the pull downs below DIV |
|
|
|
Hi,
I have a small problem where I have menus that are created using DIV, when the menus are displayed and if the page contains any pull downs falling in the menu display area, the pulldown is displayed over the menu.
I want to hide the pull down when the div is displayed. for eg. similar to text box in the following html code.
| Code: |
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<BODY>
<FORM name="frmTest">
<div id="TestCombo" style="top:0px;left:0px;height:100px;width:800px;position:absolute;visibility:hidden;text-align:center; z-index:1000;background-color:#e5e5e5;">This is to <BR>Test the visiblity of combo</div>
<TABLE width="800px" cellpadding=0 cellspacing=0 border=0>
<TR>
<TD nowrap width="100px" height="100px" valign=top>
<SELECT NAME="cboSelect" class="selectmedium11" >
<option >This is to</option>
<option >This is to test </option>
</SELECT>
<TD nowrap width="700px" valign=top><input type=text name=txtText value="Test"></SELECT>
</TD>
</TR>
<TR>
<TD nowrap colspan=2 width="100%"><input type=button name="showDiv" value="Show Div" onclick="javascript:showHideDiv('visible')"> <input type=button name="hideDiv" value="Hide Div" onclick="javascript:showHideDiv('hidden')"></TD>
</TR>
</TABLE>
<SCRIPT LANGUAGE="JavaScript">
<!--
function showHideDiv(prop)
{
document.getElementById("TestCombo").style.visibility = prop;
}
//-->
</SCRIPT>
</FORM>
</BODY>
</HTML>
|
-Nagasree |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Thu Apr 21, 2005 5:58 am |
|
|
|
| It would see that you already have example code working which you can work from. |
|
nagasree
Joined: 21 Sep 2004 Posts: 81 Location: Hyderabad, India
|
Posted: Fri Apr 22, 2005 3:57 am |
|
|
|
| Did not get u |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Fri Apr 22, 2005 6:12 am |
|
|
|
| The example you posted seems to do what you want |
|
nagasree
Joined: 21 Sep 2004 Posts: 81 Location: Hyderabad, India
|
Posted: Wed Apr 27, 2005 9:52 pm |
|
|
|
Hmmm,
I am not sure it does if u run the html and on clicking the Show Div button the layer is displayed, but if you observe only the text box becomes hidden but not the Combo/pulldown.
I am using IE6
When I am displaying the layer, I need to hide the the pulldown also.
-Nagasree |
|
degsy

Joined: 23 Feb 2005 Posts: 2440 Location: North East, UK
|
Posted: Thu Apr 28, 2005 6:54 am |
|
|
|
I always thought that the objects rendered by the OS, such as Select boxes overrode the CSS Visibility.
I'm not sure if this has changed since, but I don't think it has. |
|
edgemonkey
Joined: 05 May 2006 Posts: 1 Location: Oklahoma
|
Posted: Fri May 05, 2006 4:16 am Probably a Windows Bug |
|
|
|
I have the exact same problem with select pulldowns always being displayed over a div of any z-index (on IE only). It really confounds me so bad my head wants to explode!
I'll bet its a windows issue, because a pulldown may need to be displayed outside of the current window or over another window, and they probably just never noticed the div issue.
Cheers!
-Josh |
|
sizzler
Joined: 12 Apr 2007 Posts: 1
|
Posted: Thu Apr 12, 2007 3:19 am Div over combo |
|
|
|
this is a classical problem,
i have another better option for that,
check out : http://www.divcombo.blogspot.com/
I have also given an example |
|
Keikura

Joined: 24 Mar 2007 Posts: 167 Location: U.K.
|
Posted: Thu Apr 12, 2007 11:40 am |
|
|
|
z-index'ing will solve the problem of drop down lists being displayed over CSS positioned elements.
The exception to this is IE6 which DOESN'T do z-index'ing whereas IE7 does.
The only way to get around it is either reposition the menu's or the drop down's.
Neither is really that good but there is third of using JS to hide the drop down's when you open up one of your menu's.
edit: And yes, AFAIK this is ONLY an IE6 problem, why they left z-index'ing out of IE6 in the first place is a great mystery... |
|
|