I am trying to modify a PrimeFaces Menu (not MenuBar) so that it displays horizontally.
I am trying to apply styles like so:
<h:form>
<p:menu styleClass="horizontalMenu">
<p:menuitem value="Home" url="./home.xhtml"/>
<p:menuitem value="Contact Us" url="./contactUs.xhtml"/>
<p:menuitem value="Shop" url="./shop.xhtml"/>
</p:menu>
</h:form>
Where in a separate CSS file I have the following:
.horizontalMenu li {
display:inline;
float:none;
}
However, my styles are always overridden by PrimeFaces styles (.ui-menuitem, for example).
I was hoping for a solution that wasn't global, as I may need vertial menu's too, so this rules out editing a theme's CSS file.