'PrimeNG 11.4 menu bar align items on the right

I spend almost 2 hours trying to figure out how to align items on the right. I tried 'text-align', 'flex' and everything I know, maybe I'm just using my css on the wrong class. The version of primeng I'm using is 11.4.2. That's my code.

<p-menubar [model]="items"
       [style]="{
           'background-color': 'var(--primary)',
           'border-radius': '0',
           'text-align': 'right'
}">
</p-menubar>

And this is now how it looks.

screen image menubar



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source