Menubar with some buttons aligned to the right

UI Components for JSF
Post Reply
Fortega
Posts: 2
Joined: 10 May 2011, 07:45

10 May 2011, 07:48

Hi,

is it possible to have some of the buttons of the menubar aligned to the right?

I tried the following:

Code: Select all

<p:menubar>
    <p:menuitem value="home" url="/home.xhtml" icon="ui-icon ui-icon-home" />
    <p:menuitem style="float:right;" value="Quit" url="http://www.primefaces.org" icon="ui-icon ui-icon-close" />
</p:menubar>
but I can't even find the float:right in the source code of the html page afterwards...

Fortega
Posts: 2
Joined: 10 May 2011, 07:45

10 May 2011, 17:37

jquery to the rescue?

prime.fan
Posts: 2
Joined: 04 Aug 2011, 19:02

05 Aug 2011, 10:55

Hi,

did you find a solution? I had the same problem, and here is how I did it:

Code: Select all

<p:menuitem style="position: absolute; right: 4px;" value="Quit" url="http://www.primefaces.org" icon="ui-icon ui-icon-close" />
It works (at least for ONE menuitem on the right), but I'm not sure this is the best solution. It would be cool if we could have groups, as we do in Toolbar, and if we could align these groups accordingly.
I'm using 3.0 M2, by the way.

Post Reply

Return to “PrimeFaces”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 34 guests