How to set width of a p:column in a p:dataTable in PrimeFaces 3.0?

前端 未结 8 1123
你的背包
你的背包 2020-12-13 17:51

I\'m using PrimeFaces 3.0-M3 and I have a with two columns in it. I want the first column to be fixed at a width of 20px. The other column c

8条回答
  •  暖寄归人
    2020-12-13 18:41

    Addition to @BalusC 's answer. You also need to set width of headers. In my case, below css can only apply to my table's column width.

    .myTable td:nth-child(1),.myTable th:nth-child(1) {
       width: 20px;
    }
    

提交回复
热议问题