2010-02-24 103 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