My panel grid in PrimeFaces has always a white background, but I couldn't find what must be changed, since I tried using a styleClass
, modifying the CSS code of ui-panelgrid
class, using the style
tag inside p:panelGrid
, p:row
or p:column
. Nothing worked.
Tried:
p:column style="background-color: transparent !important;"
or
.ui-panelgrid, .ui-panelgrid td { background-color: transparent !important; }
Screenshot:
Thanks to a related question about removing p:panelGrid border, found out I need to override both td and tr. Background removed. Borders removed. :)
.noBorder tr,
.noBorder td { border: 0 !important; }
.transparentBackground tr,
.transparentBackground td { background: transparent !important; }
I created a custom class because the previous code did unwanted changes.