How do I conditionally color the background in a table cell?

前端 未结 2 1397
难免孤独
难免孤独 2020-12-29 15:43

I am rendering a table with p:dataTable (PrimeFaces) and what I want to do is color the background of cells depending on the value of their content. This i

2条回答
  •  死守一世寂寞
    2020-12-29 16:18

    how about adding padding to your class , with px or percents...

    something like this

    .colored{
        background-color:yellow;
        padding-top:25px;
        padding-bottom:25px;
        padding-right:50px;
        padding-left:50px;
    }
    

提交回复
热议问题