2011-08-31 240 views
0

我已经写了下面的HTML:火狐隐藏空表格单元格

<table width="900px" style=" border-collapse:separate;"> 
     <tr> 
     <td width="33%" style=" empty-cells:show; background-image:url('box1.png'); background-repeat:no-repeat; display:inline; margin-left:auto; position:static; margin-right:auto; height:300px; "> 
      &nbsp; 
     </td> 
     <td width="33%" style="empty-cells:show;background-image:url('box2.png'); background-repeat:no-repeat; display:inline; margin-left:auto; position:static; margin-right:auto; height:300px; "> 
     &nbsp; 
     </td> 
     <td width="33%" style="empty-cells:show;background-image:url('box3.png'); background-repeat:no-repeat; display:inline; margin-left:auto; position:static; margin-right:auto; height:300px; "> 
     &nbsp; 
     </td> 
     </tr> 
</table> 

IE9和Chrome显示所有<td>小号虽然他们是空的。但是Firefox并没有。需要做些什么来解决这个问题?

+1

如果我用'background:red'替换背景图像,可以在FF6中正常工作。你确定box2.png被正确加载吗? –

+0

是的,也适用于我 - 也请注意细胞不是空的,他们有' '。 – robertc

+0

@Marc B由于Firefox 5中的“display:inline”导致问题产生。无论如何,IE和Chrome都正确加载了图像。我认为他们必须在FF6中解决这个问题。谢谢回复。 – mihsathe

回答

0

您可以使用FF支持的min-width CSS属性。

0

你可以把一个空白的细胞:

&nbsp 

但大多数人会说,不使用的页面布局表: Don't Use Tables for Layout

+0

但是,如果您实际上正在显示表格数据,则使用表格没有任何问题。 – user393274

相关问题