2017-07-11 137 views
0

我使用Bootstrap v3.0.0在表格標題上進行下拉。我在設計時使用了Chrome瀏覽器,並且一切看起來都很好。現在,當我在Firefox或IE中查看頁面時,我的單元格邊框缺失。表格邊框出現在Chrome中,但不是Firefox或IE

這是我的下拉列表的html。

<th class="dropdown"> 
    <button class="btn-th dropdown-toggle" type="button" data-toggle="dropdown" style="min-width:82px;"> 
     Colour 
     <span class="caret"></span> 
    </button> 
    <ul class="dropdown-menu"> 
     <li><a href="#" onclick="filterRows('', 0); return false;">Show All</a></li> 
     <li><a href="#" onclick="filterRows('colour','Red'); return false;">Red</a></li>  
     <li><a href="#" onclick="filterRows('colour','Blue'); return false;">Blue</a></li> 
     <li><a href="#" onclick="filterRows('colour','Green'); return false;">Green</a></li>  
     <li><a href="#" onclick="filterRows('colour','Yellow'); return false;">Yellow</a></li> 
     <li><a href="#" onclick="filterRows('colour','Brown'); return false;">Brown</a></li>       
    </ul> 
</th>    

該類BTN個

.btn-th { 
    font-weight: bold; 
    padding: 0 !important; 

    cursor: pointer; 
    border-radius: 0; 
    border-width: 0px; 
    background-color: transparent; 
    -webkit-box-shadow: none; 
      box-shadow: none; 
    border-color: transparent; 
    background-color: transparent; 
} 

的CSS它看起來什麼樣子鉻: What it looks like in chrome:

什麼樣子在Firefox: enter image description here

什麼Firefox顯示我右鍵單擊並檢查元素並選擇計算。正如你所看到的 - Firefox說它應該有一個底部邊界! enter image description here

在IE中,無論是頂部還是底部邊界存在: enter image description here

細胞任一側是沒有鐘聲或哨子的標準,並且他們被示出所有的瀏覽器的所有邊界。

我在這裏錯過了什麼 - 我的邊界去哪兒了?

回答

0

我有缺少表格邊框相同的問題。我的解決辦法是:

table{ 
     border-collapse: collapse !important; 
     border-spacing: 0px; 
    border: 1px solid #DDD; 
} 

和邊境表格行:

table tr{ 
     border-bottom: 1px solid #DDD !important; 
     } 

我使用的引導無論是在我的佈局和表也具有引導CSS類,如 「table表條紋表鑲上「

該解決方案適用於我,當我試圖解決與

border-collapse: separate !important; 

它不適合我。

相關問題