【发布时间】:2013-07-30 16:25:33
【问题描述】:
只有在我的菜单上选择选项时,我才在选择框上选择选项时遇到问题。我使用的菜单是一个插件 Jquery。
When the select box is over the menu the options is going back.我尝试将 z-index 赋予我的 div,但它没有帮助我。有人可以帮我解决这个问题吗.. 这对我来说是一个新问题...
我的 HTML:
<div id="top-search">
<form nmae='name123' action="queryexecute.php" method="POST">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<select class="styledselect" name="field_2" style="width:100px;" autocomplete="on" placeholder="Show" required="">
<option value="">Select</option>
<option value="=">Equal</option>
<option value="!=">Not equal</option>
<option value="LIKE">Like</option>
<option value=">">Greater</option>
<option value="<">Lesser</option>
<option value=">=">Greater than or equal to</option>
<option value="<=">Lesser than or equal to</option>
<option value="!==">Not identical</option></select>
</select>
</td>
<td>
<select class="styledselect" name="field_1" id="field_1" style="width:100px;" autocomplete="on" placeholder="Show" required="">
<option value="">Select</option>
<option value="`ShibAzmnNo`">no</option>
</select>
</td>
<td>
<input name='' type="submit" src="images/shared/top_search_btn.gif" />
</td>
</tr>
</table>
</form>
</div>
我的 CSS:
#top-search {
display: inline;
float: right;
position: relative;
margin: 46px -150px 0 0;
z-index: 1;
}
【问题讨论】:
-
请分享你的 html 或 css 你试试这个
-
未来问题的专业提示:使用 jsfiddle.net 创建问题的简化版本
-
这个网站你有你的解决方案我可以确定css-tricks.com/almanac/properties/z/z-index
-
@TomPHP 定义 #top-search{z-index:9999;}
标签: jquery html css forms drop-down-menu