2017-07-24 53 views
0

This is the image i use jumbotron class for just showing dropdown menu引導的傳送帶元素後面我的下拉菜單中顯示

這是我的資產淨值代碼

<ul> 
    <li><a href="index.php" style="text-decoration: none;">Home</a></li> 
    <li class="dropdown"> 
    <a class="dropdown-toggle" data-toggle="dropdown" role="button"> 
     Men <span class='caret'></span> 
    </a> 
     <ul class="dropdown-menu"> 
     <?php 
     $cat_sql = "SELECT * FROM category"; 
     $cat_run = mysqli_query($conn, $cat_sql); 
     if(false === $cat_run){ 
     echo mysqli_error($conn); 
     } 
     while($cat_row = mysqli_fetch_assoc($cat_run)) { 
     $cat_name = ucwords($cat_row['cat_name']); 
     echo" 
      <li><a href='men_watches.php?category=$cat_name'><div>$cat_name</div></a></li> 
      "; 
     } 
     ?> 
     </ul> 
    </li> 
    </ul> 

請指導我怎麼做,如果z-index的是那麼的解決方案指導我如何使用它正確。這是我的CSS代碼。我是編程新手,所以幫助我。

nav{ 
      background: black; 
      width: 100%; 
      height: 70px; 
      line-height: 70px; 
      color: white; 
      font-family: Verdana, Geneva, arial, sans-serif; 
      opacity: 0.9; 

     } 
     nav h1{ 
      font-weight: 400; 
      float: left; 
     } 
     nav ul{ 
      padding-left: 20px; 
      float: left; 
      margin-right: 20px; 

     } 
     nav ul li{ 
      list-style-type: none; 
      display: inline-block; 



     } 
     nav ul li:hover{ 
      background: orange; 
      transition: all 0.40s; 

     } 
     nav ul li a{ 
      color: white; 
      padding: 30px; 
      font-family: arial; 
      font-weight: bold; 
      font-size: 16px;   
     } 
     .dropdown-menu li a:hover{ 
        color: orange; 
       text-decoration: ; 


       } 
+0

檢查'ul' –

+0

您可以添加'Z-index'的'Z-index'屬性下拉列表類顯示優先級只設置'z-index:90;'''.dropdown'和'jumbotron'中的任何較低值 –

+0

不適用於我 – johncasio

回答

0

嘗試:

li.dropdown {z-index: 98} 
 
li.dropdown ul {z-index: 99;}

相關問題