Remove border from all PrimeFaces p:panelGrid components

John Alexander Betts picture John Alexander Betts · Sep 19, 2013 · Viewed 19.2k times · Source

I need to hide all borders of all panelgrids using primefaces. I have tried he following without effects:

table {
    border: none;
}

table tr, table td {
    border: none;
}

What can I do?

Answer

BalusC picture BalusC · Sep 19, 2013

You need to be at least as specific as the PrimeFaces default selector.

.ui-panelgrid>*>tr,
.ui-panelgrid .ui-panelgrid-cell {
    border: none;
}

Do not use !important unless you need to override a hardcoded style on a HTML element.

See also: