How to centralize primefaces menubar?
css, java, jsf, primefaces
Solution
To center elements in the menubar (aka center the content), I think you would this because the bar is 100% width. In the facelet add the "styleclass" attribute to the menubar:
<p:menubar styleClass="centeredMenuBar">
and in the css file just add:
.centeredMenuBar.ui-menubar {
text-align: center;
}
.centeredMenuBar .ui-menu-list {
display: inline-block;
}
Problem
I need to centralize the primefaces menubar. I tried this: `<p:menubar style="text-align: center !important">` but it did not work. Please, help!