3
Contributors
7
Replies
26
Views
4 Years
Discussion Span
Last Post by designershiv
0

you should be able to use the "z-index" property to layer them in the order as you see fit.

0

Ok, you'll have to provide a link to your site or post the relevant HTML, CSS, and/or javascript code. Or post it on jsfiddle

0

Hey JorgeM,
thanks again, Please check the sample code, give me your feedback.

<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>jQuery</title>
<style type="text/css">
* {
    margin:0px;
    padding:0px;
}
.wrap{ width:500px; margin:0 auto;}
ul.nav { float:left; }
ul.nav li { float:left; padding:0px 10px;  border-right:1px solid #ccc; position:reltaive; list-style-type:none;}
ul.nav li ul { position:absolute; left:-999px; }
ul.nav li:hover ul { left:auto; position:absolute; }
ul.nav ul li { width:150px; float:none;  border:0px; background:#999; }
ul.nav ul li a { color:#fff; text-decoration:none;}
.selectBox { margin-left:100px; margin-top:10px;}
</style>
</head>

<body>
<div class="wrap"><ul class="nav">
<li><a href="#">navigation</a></li>
<li><a href="#">navigation</a>
<ul>
<li><a href="#">sub navigation</a></li>
<li><a href="#">sub navigation</a></li>
<li><a href="#">sub navigation</a></li>
<li><a href="#">sub navigation</a></li>
</ul>
</li>
<li><a href="#">navigation</a></li>
</ul>
<br>
<div class="selectBox">
    <select>
    <option>value</option>
    <option>value</option>
    <option>value</option>
    <option>value</option>
    </select>
</div></div>
</body>
</html>
0

Interesting challenge. It appears that the option elements are not affected by z-index. There's quite a bit of chatter on the various forums about similar issues. The only thing I could come up with was an approach using jQuery to hide/show the select elmenent when hovering over the navigation menu.

http://jsfiddle.net/TaRJQ/

0

There are articles where I try to explain that UI elements are no real DOM elements but OS provided ctrl's, which tend to (among other unexpected results) refuse z-index instruction and re-surface.

0

Hey jorgeM,

thanks for your replay, I already tried that and it was working fine.
But in my case, its a dashboard application and it wont be user friendly because all select box generated dynamically. I am working on it, will let you know if i fix this

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.