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!

Drop Menus sit on top of my CSS Layer

Status
Not open for further replies.

westcoaststyle

Programmer
Oct 15, 2001
81
US
I have a css layer that becomes visible when the user clicks on a certain link. This layer is sitting on z-index 1000 (just to be sure...). When this layer is visible, the drop menus on the page itself sit on top of the new layer. Why? Do I need to do something special to the drop menus? Do I need to do something special to my layer?

Thanks!
 
What sort of 'drop-menus' are we talking about? If you're using a HTML <select> tag, then IE will render it as a system control with a z-index far surpassing anything on the page.

You'll need to either:
a) put up with it,
b) move the layer out of the way, or
c) change your <select> tags into some sort of DHTML arrangement.
 
Yes, simple <select> drop menus... dam microsoft!

Could you give me an example of option &quot;c&quot;?

Thanks for the reply!
 
I forgot option D, which is to put your drop-down into another layer, which you set to be invisible prior to showing the other css layer. However option C would depend on what you are using the drop-down menu for. Is it for the user to select a value in a form which is then submitted, a 'jump-box' to select a link to another page or something else. If you can give me an idea on the purpose of the drop-down, I'll tailor the example more toward what you need.
 
I'm using it for a user to select an option to be submitted with the form - nothing more.

As for option &quot;d&quot;, I could just use style=&quot;visibility:show&quot; on the drop menu and then when I click to show my new layer, I could change the value to &quot;visibility:hide&quot; couldn't I?

I'm going to play with it and see what I can get to work.

Thanks again for the help!
 
I found a fix... it's a variation on D. I just swap the style values on the drop menus when I show the overlying layers. I have the <select>s set at style=&quot;visibility:show;&quot; to begin with and then swap the value to style=&quot;visibility:hide;&quot; when I show my overlying layers. :)

Works like a charm.

Thanks for the help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top