hi!
have a look at the following one-column-table:
<rich:dataTable value="#{Bean.dataList}" var="list" id="logtable">
<rich:column>
<f:facet name="header">
<h:panelGrid>
<h:commandLink value="Id" actionListener="#{Bean.sort}"/>
<h:inputText value="#{Bean.id}"/>
</h:panelGrid>
</f:facet>
<h:outputText value="#{list.id}" />
</rich:column>
</rich:dataTable>
there's a strange behaviour there:
if the column-data (list.id) is wider than the header contents, the header contents aren't centered.
if the header contents are wider (e.g. by adding size="500" to the inputText) the header is centered.
any idea how to center the header in the first case?
i've tried to change some of the dataTable's css properties, but without success.
thanks for your help.
In theory, this should do it:
.rich-table-headercell {
text-align: center;
}
I have not tried it, but that's how the header cells are centered in the demo page:
http://livedemo.exadel.com/richfaces-demo/richfaces/dataTable.jsf?c=dataTable