简体   繁体   中英

How to set rules to none in p:panelGrid?

Unlike <h:panelGrid> , <p:panelGrid> has no option like rules . All rules appear between cells in <p:panelGrid> , by default. For example,

<p:panelGrid style="table-layout: fixed; width: 100%; word-wrap: break-word;">
    <f:facet name="header">
        <p:row>
            <p:column colspan="3">
                <h:outputText value="Header"/>
            </p:column>
        </p:row>
    </f:facet>

    <p:row>
        <p:column>1</p:column>
        <p:column>2</p:column>
        <p:column>3</p:column>
    </p:row>

    <p:row>
        <p:column>1</p:column>
        <p:column>2</p:column>
        <p:column>3</p:column>
    </p:row>

</p:panelGrid>

will display a grid layout as follows.

网格布局

How to remove these lines (horizontal & vertical) between cells something like an HTML table <table rules="none"> ?

You can use the following CSS

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM