primefaces menubar logout right side

borj picture borj · Dec 29, 2012 · Viewed 13.3k times · Source

Hi I followed this code but my logout button is not at the right side of menubar.

sample from PF

here is my xhtml page

<h:body>
    <p:menubar autoDisplay="false">
        <p:menuitem value="Home" url="/index.jsf" />

        <p:submenu label="Maintenance" >
            <p:menuitem value="Course" url="/views/course/list.jsf" />
            <p:menuitem value="Student" url="/index.jsf" />
        </p:submenu>

        <f:facet name="options">
            <p:commandButton type="button" value="Logout" icon="ui-icon-extlink" />
        </f:facet>
    </p:menubar>
</h:body>

Answer

Mathias Nunez picture Mathias Nunez · Jan 4, 2013

You should use a style="float: right;" inside the button or include the property into your css stylesheet.