2013-07-30 25 views
-2

選擇,我選擇的選擇框選項時,面臨的問題,只有當在我的菜單中選擇選項。我正在使用的菜單是一個插件JQuery。不能在選擇框在菜單

enter image description here

當選擇框在選擇是回到菜單。我試着給我的div,但它沒有幫助我的Z - 索引。有人可以幫我解決這個問題。它的一個新的問題,我...

我的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="&gt;">Greater</option> 
      <option value="&lt;">Lesser</option> 
      <option value="&gt;=">Greater than or equal to</option> 
      <option value="&lt;=">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; 
    } 
+0

http://www.w3schools.com/cssref/tryit.asp?filename=trycss_zindex – falguni

+0

你的意思是到div? – TomPHP

+1

請分享你的HTML或CSS你試試這個 – falguni

回答

1

z-index問題,您應該增加的選擇的父元素的z-index,對菜單的

像父元素

<div style="position:relative;z-index:9999">select item</div> 

<nav style="position:relative;z-index:99">menu items</nav> 

OR

#top-search{z-index:9999;} 
+0

evn當我給我的Z指數到20這個問題仍然沒有得到解決..任何想法? – TomPHP

+1

請也給z-index的淨值計算,它應該是小於#頂級搜索,也相對位置爲什麼它downvoted添加到菜單容器 – Hushme

+0

可以有一個人告訴我嗎? – TomPHP