日期:2014-05-17  浏览次数:22538 次

ie6的css问题 我给td定义了下划线,当TD内无内容时,没有下划线。
CSS定义如下:
.DataGrid { background-color: #ffffff;border: 1px solid #D3E7E6;}
.DataGrid td{padding:3px; height:24px; border-bottom:1px solid #e9e9e9; background-color:#fff; display:block}
.DataGrid_Item { background-color: #FBFFFF; padding:4px;}


html代码如下:
<table width="100%" border="0" cellpadding="0" cellspacing="1" class="DataGrid">
  <tr class="DataGrid_Item">
  <td width="30" align="center">1</td>
  <td width="80">李大伟</td>
  <td width="100">中山市西区 </td>
  <td>西区中心小学 </td>
  <td width="65" align="right"></td>
  <td width="80" align="right" class="font_org">60</td>
  <td width="65" align="right"><a href="#">600</a></td>
  <td width="80" align="right" class="font_org">595.61 </td>
  <td width="110" align="center">2010-04-15 14:32</td>
  </tr>
</table>

如上html代码,第四个TD标签内没有内容,border-bottom:1px solid #e9e9e9;这个样式不起作用。请各位高手赐教。

ps:

1、不能加多余字符如&nbsp;,因为这样要麻烦到程序员。
2、IE8和FIREFOX可以正常显示。

------解决方案--------------------
.DataGrid td {
padding: 3px;
height: 24px;
border-bottom: 1px solid #e9e9e9;
background-color: #fff;
zoom:expression(this.innerHTML==""?(this.innerHTML="&nbsp;"):0);
}