【问题标题】:how to remove margins of <p:layoutUnit>如何删除 <p:layoutUnit> 的边距
【发布时间】:2012-09-14 17:01:42
【问题描述】:

是否可以在下面提到的代码中删除所有四个边上的&lt;p:layoutUnit&gt; 的所有边距?

            <p:layout style="max-width: 80%;height: 700px" fullPage="false">
            <p:layoutUnit position="north" size="100" style="border: 0px">
                <div align="right">
                    <p:selectOneMenu id="city">  
                        <f:selectItem itemLabel="Select City" itemValue="" />  />  
                    </p:selectOneMenu>                                             
                </div>
                <h:graphicImage alt="DiscountBox.in" value="/images/discountbox_logo.jpg" /> 
            </p:layoutUnit>

            <p:layoutUnit position="west" size="20%" style="border: 0px">
                <p:panel header="Categories">  
                    <p:menu style="border: 0px">
                        <p:submenu>
                            <p:menuitem value="Demo" url="http://www.primefaces.org/showcase-labs/ui/home.jsf" />
                            <p:separator />
                            <p:menuitem value="Documentation" url="http://www.primefaces.org/documentation.html" />
                            <p:separator />
                            <p:menuitem value="Forum" url="http://forum.primefaces.org/" />
                            <p:separator />
                            <p:menuitem value="Themes" url="http://www.primefaces.org/themes.html" />
                        </p:submenu>                          
                    </p:menu>                        
                </p:panel>
            </p:layoutUnit>

            <p:layoutUnit position="center" style="border: 0px">
                <p:panel header="Search">  
                </p:panel>  
                <p:panel header="Search">  
                </p:panel>                      
            </p:layoutUnit>

            <p:layoutUnit position="south" size="100" style="border: 0px">
                Footer
            </p:layoutUnit>                
        </p:layout>         

【问题讨论】:

    标签: css jsf primefaces


    【解决方案1】:

    在你的页面上放这个:

    <head>
        <style type="text/css">
            .ui-layout, .ui-layout-doc, .ui-layout-unit, .ui-layout-wrap, .ui-layout-bd, .ui-layout-hd{
                 border: none;
            }
        </style>
    </head>
    

    【讨论】:

      【解决方案2】:

      p:layoutunit 中有一个属性叫做gutter

      <p:layoutUnit position="north" size="80" gutter="0"> 
      

      【讨论】:

        猜你喜欢
        • 2016-03-20
        • 2012-01-17
        • 2017-04-03
        • 2016-11-19
        • 2023-03-31
        • 2020-02-06
        • 2015-09-22
        • 2013-12-23
        • 1970-01-01
        相关资源
        最近更新 更多