2012-02-13 39 views
1

我已經定義了一個html表格,並且我需要在IE 9和IE 7(無論是否有黑客)中都可以使用css。下面我的CSS描述:IE 7:邊框不能按預期工作

.grid 
{ 
border: 1px solid #C3C3C3; 
background-color: #D5E0FF; 
color: #555555; 
font-size: 11px; 
border-collapse: collapse; 
clear: both; 
float: left; 
margin-top: -5px; 
} 

.grid td 
{ 
border: 1px solid #C3C3C3; 
*padding: 6px 5px 6px; 

} 

.grid_center_align 
{ 
text-align: center; 
} 

.grid_data_lotes 
{ 
width: 120px; 
text-align: center; 
} 

.grid_header 
{ 
background-color: #02325E; 
color: #FFFFFF; 
text-decoration: none; 
} 

.grid_header a 
{ 
color: #FFFFFF; 
text-decoration: none; 
} 

.grid_header a:hover 
{ 
color: #FFFFFF; 
text-decoration: underline; 
} 

.grid_header th 
{ 
border: 1px solid #111111; 
} 

類「.grid_header日」並不在IE 7中很好地工作,只在左邊框上THEAD出現與所定義的顏色。有人知道解決方案嗎?

在此先感謝。

更新:

標題代碼:

<thead> 
    <tr class="grid_header"> 
     <th scope="col"> 
      <a>Name</a> 
     </th> 
     <th scope="col"> 
      <a>Status</a> 
     </th> 
     <th scope="col"> 
     </th> 
     <th scope="col"> 
     </th> 
    </tr> 
</thead> 

回答

1

IE7是不是很好用border-spacing。它需要特別的照顧。

在這個具體的例子,它的工作原理,如果你從表中刪除border屬性,僅在th離開border預期。那對你有用嗎?

+0

是的,謝謝! :) – Leila 2012-02-13 14:16:06