2014-07-03 47 views
0

FIDDLE DEMO滾動條達到

我有一個問題,我有一個具有max-height集的容器,但未知原因的包裝不斷顯示垂直滾動條。

我唯一能找到的可能是問題是.right類中的:after僞類。如果我刪除這個滾動條去。爲什麼是這樣?該:after內容絕對定位,它不應該有滾動條上的任何影響......

供參考,這是沒有達到設定在.emails

這個max-height的是,事項CSS - 在小提琴上多加幾個位;

.indicator_triangle { 
    position: absolute; 
    bottom: -24px; 
    width: 0px; 
    height: 0px; 
    border-style: solid; 
    border-width: 0 12.5px 20px 12.5px; 
    border-color: transparent transparent #fff transparent; 
} 
.comm_dd { 
    position: absolute; 
    top: 15px; 
    border: 3px solid $green; 
    display: none; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4); 
    border: 3px solid $green; 
    width: 170px; 
    background-color: #fff; 
    z-index: 10; 
    list-style: none; 
    margin: 0; 
    padding: 5px; 
    width: 350px; 
    font-size: 12px; 
    .e_container { 
     .emails { 
      overflow-y: auto; 
      // min-height: 180px; 
      max-height: 350px; 
      border-top: 1px solid $grey_med; 
     } 
     h4 { 
      margin-top: 0; 
      margin-bottom: 5px 
     } 
     p { 
      color: #888; 
      margin-bottom: 4px; 
     } 
    } 
    .left { 
     width: 72%; 
     float: left; 
     div { 
      margin-right: 15px; 
     } 
    } 
    .right { 
     width: 25%; 
     float: left; 
     font-size: 11px; 
     &:after { 
      position: absolute; 
      top: 14px; 
      right: 4px; 
      content:"\00b0"; 
      font-size: 32px; 
     } 
    } 
    .subj { 
     font-weight: bold; 
    } 
    li { 
     line-height: 16px; 
     a { 
      position: relative; 
      padding: 6px 5px; 
      display: block; 
      color: $grey; 
      border-top: 1px solid #ddd; 
      color: #888; 
      padding: 7px 5px; 
      &:hover { 
       background-color: darken(#fff, 10%); 
      } 
     } 
     .remaining_count { 
      top: 9px; 
      right: 9px; 
     } 
     &:first-child a { 
      border-top: none; 
     } 
    } 
    .indicator_triangle { 
     top: -15px; 
     left: 5px; 
    } 
} 
+1

你可以設置溢出:隱藏到.comm_dd li選擇器 – athms

+0

@athms可以自由地給出這個答案 - 它的工作原理! :] – Novocaine

+0

好吧,剛纔:) – athms

回答

1

您可以設置溢出:隱藏到.comm_dd裏選擇,以防止:after僞含量造成的列表項溢出。

+0

非常感謝,這已經困擾了我好幾天! – Novocaine