ehab refaat ehab refaat - 1 year ago 1153
CSS Question

PrimeFaces p:selectOneMenu width

I want

width to be auto regarding to the parent cell not regarding to the values it has.

<p:column><p:outputLabel value="Value01" for="idInput01"/></p:column>
<p:column><p:inputText value="#{bean.input01}" id="idInput01" /></p:column>
<p:column><p:outputLabel value="Value02" for="idSelect" /></p:column>
<p:selectOneMenu value="#{bean.selectedObject}" id="idSelect" converter="objectConverter">
<f:selectItems value="#{bean.objectsList}" var="varObject" itemLabel="#{varObject.label}" itemValue="#{varObject}" />

What I've got :

enter image description here

What I'm expecting :

enter image description here

Note: I don't want to specify a fixed width.

Answer Source

i overrode .ui-selectonemenu, .ui-selectonemenu-label to:

     width: 100% !important;
     width: 100% !important;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download