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

前端 未结 8 1141
你的背包
你的背包 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:42

    In PrimeFaces 3.0, that style get applied on the generated inner

    of the table cell, not on the as you (and I) would expect. The following example should work out for you:

    
    

    with

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

    In PrimeFaces 3.5 and above, it should work exactly the way you coded and expected.

提交回复
热议问题