selectOneMenu style in PrimeFaces

Telson Alva picture Telson Alva · Jul 31, 2013 · Viewed 11.7k times · Source

I have been struggling to make adjustments in the fonts size and adjustment i the selectOneMenu, but i have come to peace with it, however after upgrading PrimeFaces from 3.2 to 3.4.2, the selectOneMenu has a gap prefixed to it, which is very annoying.

PrimeFaces 3.2 selectOneMenu

PrimeFaces 3.2 selectOneMenu

PrimeFaces 3.4.2 selectOneMenu

PrimeFaces 3.4.2 selectOneMenu

Code

<p:selectOneMenu id="Category" value="#{databaseSearch.category}" style=" font-size: 35px; height: 20px; width: 80px;">

                                        <f:selectItem itemLabel="Machine" itemValue="Machine"/>
                                        <f:selectItem itemLabel="Company" itemValue="Company"/>
                                        <f:selectItem itemLabel="Contact" itemValue="Contact"/>
                                        <f:selectItem itemLabel="Phone" itemValue="Phone"/>
                                        <f:selectItem itemLabel="Email" itemValue="Email"/>

                                    </p:selectOneMenu>

What do i do ? :(

Answer

Mathew Rock picture Mathew Rock · Aug 2, 2013

You need overrided this css .ui-selectonemenu .ui-selectonemenu-label