2016-09-03 5 views
0

私はそれがmthe検索ボックスあちこちに合わせて、ドロップダウンボックスがあるというのが私の目を乱すprimefaces2つの素体 - 要素を正しく整列する方法は?

<p:toolbar style="margin:20px 0px"> 
    <f:facet name="left"> 
     <p:outputLabel value="#{loginBean.fullname}" /> 
    </f:facet> 

    <f:facet name="right"> 
     <p:inputText style="margin-right:10px" placeholder="Search" disabled="true"/> 
     <p:themeSwitcher effectSpeed="normal" effect="fade" style="width:165px; margin-right:10px;" id="defaultSwitcher" value="#{themeSwitcherBean.theme}"> 
      <f:selectItem itemLabel="Choose Theme" itemValue="" /> 
      <f:selectItems value="#{themeSwitcherBean.themes}" /> 
      <p:ajax global="false" listener="#{themeSwitcherBean.saveTheme}" /> 
     </p:themeSwitcher> 
     <p:commandButton action="#{loginBean.logout}" title="Log Out" style="width:36px; height:20px" icon="ui-icon-power" value="" ajax="false"></p:commandButton> 
    </f:facet> 
</p:toolbar> 
右側にレンダリングする

enter image description here

からメニューバーを使用します同じ高さではありません。

正しく整列させる方法を知っていますか?

答えて

-1

CSSを使用してドロップダウンボックスの外観を修正する必要があります。 p:themeSwitcherスタイルのarrtibuteに "margin-top"または "padding-top"プロパティを追加してみてください。

+0

もっと良い解決方法を知っている人はいますか? – kalym4ik

+0

私は両方を試しました。 http://imgur.com/a/iSOYGを参照してください。両方とも動作していません。 –

関連する問題