I have a <p:menubar> in a xhtml template. The div that surrounds it has these CSS properties:
position: fixed;
top: 44px;
width: 100%;
So I can fix the menu header while user scrolls down the page.
The problem now is that some Prime Faces component have icons and headers overflowing the menu.

I tried to work with z-index but no success. I imagine that there is another solution in PrimeFaces instead of z-index.
Thanks a lot.
According to the PrimeFaces default style sheet
primefaces.css, the<p:message(s)>icon is relatively positioned.I’m in first place not sure why it’s relatively positioned as it doesn’t seem to need to be offsetted nor have any absolutely positioned children. Perhaps it’s been used as some (most likely IE-specific) workaround/hack for something else (if this was “has layout” related, the developer would better have used
overflow: hiddeninstead for this). So just making it the defaultposition: staticshould fix it.Add the following to your override stylesheet to achieve this:
Alternatively, you could of course also set
z-indexof the menu with an insane high value, as you figured out yourself. I wouldn’t consider this a reliable solution though, this is too much a workaround/hack.