Centralize components of a datatable that is in data editing in Primefaces

Asked

Viewed 1,470 times

0

How can I center the components of this datatable. When I click to edit the data of the same I realize that the components of data entry are not centralized, but when using a certain tests with css I was able to reach the side but they are not precisely at the center of each column.

Imagem da datatable

Would such a fact be possible?

  • Each element of the primefaces has one or more style classes, looks for the class of components that wants to center and center them using this class.

  • @Patrick I came to use the direction and margin-left and managed to move using the inspector of Google Chrome managed to work. But it is not centralized.

  • Have you tried using margin: 0, auto?

  • @Patrick applying about the tag ui-cell-editor-input did not move, remembering that it is a div

1 answer

1

For those who wish, include in your style sheet the following property.

.ui-cell-editor-input {
    text-align: center;
}

And when you edit the data from datatable the component of edit was at the centre.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.