2017-06-24 46 views
0

我正在努力解決這個問題。我有一個垂直的菜單列表,裏面的溢出設置爲'滾動'(我也嘗試過自動)。如果將鼠標懸停在菜單項上(溢出設置爲滾動)設置,菜單值不會顯示。這是它如何顯示的圖像。 error從父親溢出孩子溢出:滾動

這是上述情況的代碼。 Not Working

這是導致很多麻煩的代碼的CSS部分:

  .sidebar{ 
        position: absolute; 
        top: 0px; 
        right:0px; 
        text-align: center; 
        font-family: 'Roboto','sans-serif'; 
        line-height: 30px; 
        padding-left: 10px; 
        z-index: 10; 
        float:right; 
        margin-right:20px; 
        height: 100px; 
        //overflow:scroll; //This is the code to be changed 
      } 

      .sidebar ul{ 
       z-index:25; 
      } 

      .insideul{ 
       overflow: scroll; 
      } 

      #mainist li{ 
       z-index:50; 
      } 

這裏是工作的形象。 working

這是工作代碼,如果我刪除溢出。 working

有人可以幫我解決上述錯誤。 謝謝。

+2

您好,我只是刪除了 ''溢出:scroll'' 從'.insideul'階級統治和一切工作。 – Catalyst

+0

催化劑是正確的。在你的小提琴中刪除 overflow-x:auto; overflow-y:auto; from .sidebar – buxbeatz

回答

0

我只是註釋掉了.sideBar類中的overflow-x:auto和overflow-flow:auto,它工作正常。

https://jsfiddle.net/3z8mq4k3/1/

.sidebar{ 
       position: absolute; 
       top: 0px; 
       right:0px; 
       text-align: center; 
       font-family: 'Roboto','sans-serif'; 
       line-height: 30px; 
       padding-left: 10px; 
       z-index: 10; 
       float:right; 
       margin-right:20px; 
       height: 700px; 
       /*overflow-x: auto; 
       overflow-y: auto;*/ 
     } 
+0

我想要滾動條。我有大量的數據。 –