2010-02-24 104 views
1

我有一些6個按鈕要顯示在工具欄中,並且按鈕必須以這樣一種方式顯示,即有一個分組,即3個按鈕後跟一個空格然後又是另外3個按鈕。我使用JSF作爲UI框架。按鈕之間的空格之間的文本消失在IE

的問題在於,當我在第一組最後一個按鈕在要顯示的即有間「點擊這裏」有空間的文字,只有點擊獲取顯示

使用表HTML標籤組的一組其實即時通訊按鈕

<table> 
    <tr> 
     <td> 
      <%-- 1st 3 buttons --%> 
      <%-- the last button here has the text "Click here", But only Click is displayed in UI --%> 
     </td> 
     <td></td> 
     <td></td> 
     <%-- This is used to get the gap between group of buttons and this is what is causing the issue --%> 
     <td> 
      <%-- Another 3 buttons --%> 
     </td> 
    </tr> 
</table> 

代碼按鈕中的一個(所有其他使用同樣方法繪製)

<hx:jspPanel id="b1" rendered="true"> 
    <p:outputButtonLink id="b11" rendered="true" 
     value="Click Here" 
     iconSrc="../../images/click1.gif" 
     href="#" onclick="return Show();"> 
    </p:outputButtonLink> 
</hx:jspPanel> 
+0

請發佈發出按鈕的代碼以及 – 2010-02-24 06:10:21

+0

也給出生成的HTML。什麼是'p:'? Primefaces? – Bozho 2010-02-24 06:52:44

回答

1

IE不會呈現「空」的表格單元格。將&nbsp;放在它們中以使IE呈現它們。

<td>&nbsp;</td> 

這就是說,我強烈建議您多學習一點CSS。這是一個易於修復的margin

+0

感謝您的回覆巴魯,但達力工作。 我已經想出了讓表格本身來分組按鈕導致的問題。 – Arun 2010-02-25 05:07:20

+0

非常感謝,我可以通過設置CSS屬性寬度來解決它:100%爲td – Arun 2010-02-25 06:46:11