Adding content on the right side of menubar

UI Components for Angular
Post Reply
nas963
Posts: 2
Joined: 20 Jan 2017, 15:13

26 Jan 2017, 15:48

Hi,
is it possible to add some arbitrary content on the right side of p-menubar?
I want to add some info about logged in user, maybe drop down, logout button.
Something like this:

http://www.primefaces.org/showcase/ui/m ... ubar.xhtml

rumfuddle
Posts: 1
Joined: 20 Jan 2017, 17:29

02 Feb 2017, 13:03

I have added this to my menubar component to move the last item to the right:

styles: [':host /deep/ li.ui-menuitem:last-child { float: right; !important;}']

nas963
Posts: 2
Joined: 20 Jan 2017, 15:13

06 Feb 2017, 10:59

I start with same, but I need to add some other components (not only last menu item).
For now I solve problem with two divs. In first div is menubar and in second are other components. Second div is styled as menubar, so visually there is no difference.

Bindrid
Posts: 7
Joined: 23 Nov 2021, 01:12

24 Nov 2021, 02:19

I used the float right trick which positioned the menu to the right as I hoped. HOWEVER, the submenus drop down to the right out side of the screen.

How to I make right side menus flow to the left?

MagnusU
Posts: 2
Joined: 17 Nov 2021, 11:05

02 Dec 2021, 08:16

Bindrid wrote:
24 Nov 2021, 02:19
I used the float right trick which positioned the menu to the right as I hoped. HOWEVER, the submenus drop down to the right out side of the screen.

How to I make right side menus flow to the left?
i used

:host ::ng-deep .p-menubar {

.p-submenu-list {
left: auto;
right: 0;
}
}

to make it drop down and expand to the left, see if you can use that or at least have that as a starting point
// MagnusU

Post Reply

Return to “PrimeNG”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 8 guests