How to remove border from specific PrimeFaces p:panelGrid?

前端 未结 15 1624
再見小時候
再見小時候 2020-12-02 15:27

I have difficulty in removing border from a specific PrimeFaces .


    &l         


        
15条回答
  •  有刺的猬
    2020-12-02 16:04

    The border is been set on the generated tr and td elements, not on the table. So, this should do:

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

    How I found it? Just check the generated HTML output and all CSS style rules in the webdeveloper toolset of Chrome (rightclick, Inspect Element or press F12). Firebug and IE9 have a similar toolset. As to the confusion, just keep in mind that JSF/Facelets ultimately generates HTML and that CSS only applies on the HTML markup, not on the JSF source code. So to apply/finetune CSS you need to look in the client (webbrowser) side instead.

    enter image description here

    See also:

    • How do I override default PrimeFaces CSS with custom styles?
    • Remove border from all PrimeFaces p:panelGrid components

    If you're still on PrimeFaces 4 or older, use below instead:

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

提交回复
热议问题