문제

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?

도움이 되었습니까?

해결책

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:

다른 팁

This solution affect only panelGrids but dataTables:

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

Thanks to the answer published by Kukeltje here: Remove all border on all panelgrids not on datatables

It may be that your CSS is overwritten somewhere else. You could try using the !important rule.

table, table tr, table td {
   border: none !important;
}

Tested on primefaces 5.1

.ui-widget-content {
border: none;
}

This work in Primefaces 5

.ui-panelgrid-content {
    border: none;
}
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top