I have designed custom drop down menus that consist of one <div>
containing the current value and functioning as a <select>
field, with another <div>
below it that appears when the top one is clicked, displaying all the <option>
values.
The layout requires the lower <div>
to be positioned slightly beneath the upper one (to achieve rounded corners, etc), so I utilized z-index
for this purpose. Everything works perfectly until there are two drop down menus in close proximity. When you click on the first menu, the option list displays below the second dropdown menu as well, which is not ideal. Here's a simplified version demonstrating the issue in a jsfiddle:
jsFiddle
As shown, the first drop down menu functions correctly but the second one is hidden beneath the third one. Do you have any suggestions on how to resolve this so that both menus work properly without using z-index? Thank you!