SelectOneMenu Width Too Small
Posted: 08 Oct 2020, 18:55
The width does not seem to be calculated correctly with the p:selectOneMenu. The down-chevron icon covers the last letter of the item.
Code: Select all
<h:panelGrid columns="2">
<p:outputLabel for="theme" value="Theme:"/>
<p:selectOneMenu id="theme" required="true" requiredMessage="Select a theme!"
value="#{editTeacherBean.user.theme}">
<f:selectItems value="#{editTeacherBean.themes}"/>
</p:selectOneMenu>
</h:panelGrid>
Code: Select all
body .ui-selectonemenu {
vertical-align: baseline;
border: 1px solid #D9DEE6;
position: relative;
transform: none;
padding: 0;
transition: background-color 0.2s, color 0.2s, border-color 0.2s, box-shadow 0.2s;
border-radius: 4px;
background: #ffffff;
}
Code: Select all
body .ui-selectonemenu .ui-selectonemenu-label {
padding-right: 2.357rem;
}
body .ui-fluid .ui-selectonemenu-label {
padding: 0.5rem 0.5rem;
}