<p>Can someone show me how to fix the width of a column in a datatable with JSF?</p>

<p>My code currently reads:</p>

<pre><code>&lt;h:column&gt;
    &lt;f:facet name="header"&gt;
        &lt;h:outputText value="Data Field 1" /&gt;
    &lt;/f:facet&gt;
    &lt;h:commandLink id="dataLink" action="#{pc_SearchResultsFragment.setField1}"&gt;
        &lt;h:outputText value="#{(qi.data1 != null) ? '' : qi.data1}"/&gt;                 
    &lt;/h:commandLink&gt;
&lt;/h:column&gt;
</code></pre>

<p>Thanks!</p>

```
```
<h:column>
    <f:facet name="header">
        <h:outputText value="Data Field 1" />
    </f:facet>
    <h:commandLink id="dataLink" action="#{pc_SearchResultsFragment.setField1}">
        <h:outputText value="#{(qi.data1 != null) ? '' : qi.data1}"/>                     
    </h:commandLink>
    <%-- <f:attribute name="width" value="20" /> fixed width --%>
    <%-- or --%>
    <%-- <f:attribute name="width" value="20%" /> percentage --%>

    <%-- also available (not a complete list, just some of the more
         common supported attributes) --%>
    <%-- <f:attribute name="align" value="left" /> --%>
    <%-- <f:attribute name="height" value="20" /> --%>
    <%-- <f:attribute name="nowrap" value="true" /> --%>
    <%-- <f:attribute name="valign" value="top" /> --%>
    <%-- <f:attribute name="bgcolor" value="red" /> --%>
    <%-- <f:attribute name="style" value="color:White;" /> --%>
</h:column>
```
```