【发布时间】:2014-05-31 10:12:06
【问题描述】:
我正在尝试将commandButton 放在右侧边距的面板组件的标题中。听起来只是一个html问题,我不知道为什么不起作用。
<p:panel id="panel" style="margin-bottom:10px;">
<f:facet name="header" >
<h:outputLabel value="#{partyBean.currentparty.name}" />
<p:commandButton id="asktojoin" style="margin-right:10px" action="#{joinRequestBean.askForParty(partyBean.currentparty)}" value="Ask to Join">
</p:commandButton>
</f:facet>
.....
按钮出现在左侧,靠近outputLabel。
【问题讨论】:
-
bhdrk 的回答看起来不错,但另外 style="float:right" 应该会有所帮助
标签: html css jsf primefaces margin