2010-02-01 108 views
0

嗨我有一個表格,邊框頂部設置爲2px。這適用於除IE8以外的每個瀏覽器。 CSS:IE8表消失的邊框頂部

<style type="text/css"> 
.mytable { 
    border-collapse: collapse; 
    border: 0; 
    border-top: 2px solid #43848C; 
    width: 300px; 
    margin:0 2em 1em; 
    border-bottom: 1px solid #72afb6; 
} 
    .mytable tr { 
     border-color: #72afb6; 
     border-width: 1px 0; 
     border-style: solid; 
    } 
     .mytable td { 
      margin: 0; 
      padding: 8px 10px 7px 10px; 
      border: 0 solid transparent; 
      border-bottom: 1px solid #72afb6; 
      vertical-align: middle; 
      width: auto;   
     } 
     .mytable .th { 
      background-color: #f0f7f5; 
      color: #42828b; 
      font-weight: bold; 
      font-variant: normal; 
      font-size: 14px; 
      vertical-align:top; 
     } 
</style> 

HTML:

<table class="mytable"> 
    <tbody> 
    <tr> 
     <td class="th">Heading 1</td> 
     <td class="th">Heading 2</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsum</td> 
     <td>Lorem ipsum</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsum</td> 
     <td>Lorem ipsum</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsum</td> 
     <td>Lorem ipsum</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsum</td> 
     <td>Lorem ipsum</td> 
    </tr> 
    <tr> 
     <td>Lorem ipsum</td> 
     <td>Lorem ipsum</td> 
    </tr> 
    </tbody> 
</table> 

謝謝! 德文

+0

所以你得到沒有邊界的全部或邊框,但與incorect風格(即wronf顏色,寬度錯誤等)? – prodigitalson 2010-02-01 19:33:39

+0

根本沒有邊框。 – Devin 2010-02-03 20:15:56

回答