ehab refaat ehab refaat - 2 months ago 159
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.


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

     width: 100% !important;
     width: 100% !important;