2011-08-31 142 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

相關問題