Link to home
Start Free TrialLog in
Avatar of anna_arun
anna_arun

asked on

How can I make any control or DIV overlap the combo box

Hi

I have made a customized control using text box and div to give a look of a drop down combno box with some advanced features. It works perfectly except it goes behind the existing combo box.
How can I make any control or DIV overlap the combo box.

Any suggestions
Avatar of umangjoshi
umangjoshi

Please try the following <div> tab with CSS...

========================================================
<div id="property_profile" border="1" cellspacing="0" cellpadding="2" align="center" bordercolor="#000000" bordercolorlight="#000000" bordercolordark="#FFFFFF" STYLE="position:absolute;z-index:1;left:43;top:60;visibility:visible;">
Pelase try this...<br>
some text here
</div>
========================================================
Cannot be done.
IE has infinate z-Index for drop-down (<SELECT>) elements.

What you can do as a workaround is either change your layout to avoid this overlapping or add a code that when something is activated (for example a menu is being opend) change the visiblity of the applicable <SELECT> to "hidden".

hi there.

the only way you can do it is to setthe visibility to hidden as avner suggested you.
select (drop down) is (as far as i know) the only element which is the most top element in the rendering layer.
no object can "overcome" it,

microsoft themself in their site usinh the visibility='hidden' to hide all the sdrop downs which intersects with their
menu when its a drop down.

i was looking for the microsoft site but i cant remmber it now.
Nushi.
Avatar of James Rodgers
avner is correct select has infinite z-index, you cannot float something 'over' a select box, the points should go to avner
ASKER CERTIFIED SOLUTION
Avatar of devic
devic
Flag of Germany image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
very nice devic...

a solution to a long plaguing problem.....

Thanks devic

In my case I applied this to a CSS dialog box.
But instead of writing contents into the iframe I made the iframe absolute positioned and sized to sit under the dialog.  (Saves all those document.writes)  It covers the nasty combo boxes and it does respond to z-index itself (unlike the combos).

In IE I had to make the iframe transparent ( filter: alpha(opacity=0); ) to stop it interfering with the background colors in the dialog.  Haven't tested it in other browsers since I'm doing an inhouse app for IE 5.
THANKS!!!!
to make it work with Netscape, Firefox...

change:
document.frames.iframM2

to:
top.frames["iframM2"]