从p:layout移除装订线 [英] Removing gutters from p:layout
问题描述
我正在使用PrimeFaces 5.0.我在<p:layout>
中设置装订线时遇到问题.
I'm using PrimeFaces 5.0. I'm having a trouble setting gutter in <p:layout>
.
<p:layout id="templateLayout" fullPage="false">
<p:layoutUnit id="header" position="north" size="155" gutter="0">
</p:layoutUnit>
<p:layoutUnit position="west" id="leftPanel" size="225" gutter="0">
</p:layoutUnit>
<p:layoutUnit position="east" size="200" gutter="0">
</p:layoutUnit>
<p:layoutUnit id="content" position="center" size="2500"
style="z-index: 1;" maxSize="2500" gutter="0">
</p:layoutUnit>
<p:layoutUnit id="footer" position="south" size="90" gutter="0">
</p:layoutUnit>
</p:layout>
事件尽管在任何地方都将装订线属性设置为0,但不会删除<p:layoutUnit>
之间的装订线.唯一被移除的天沟位于东部和中央单元之间.
Event though the gutter attribute is set to 0 everywhere, the gutters between <p:layoutUnit>
are not removed. The only gutter which is removed is between the east and the center units.
试图交替应用以下CSS.
Tried to apply the following CSS alternatively.
.ui-layout-unit {
padding-top: 0 !important;
padding-right: 0 !important;
padding-bottom: 0 !important;
padding-left: 0 !important;
}
和
.ui-layout-resizer,
.ui-layout-resizer-north,
.ui-layout-resizer-open,
.ui-layout-resizer-north-open {
height:0px !important;
}
但是那也没什么不同.
然后如何删除<p:layout>
中的所有排水沟?
How to remove all gutters from <p:layout>
then?
推荐答案
我只是遇到了同样的问题.
I just had the same problem.
我所做的是在layoutUnit组件中使用以下属性:
What I did was using the following properties in the layoutUnit component:
collapsible="true" gutter="0"
除非您将其可折叠地使用,否则装订线似乎不起作用.
It seems that gutter doesn't work unless you use it with collapsible.
归功于Primefaces论坛的好人:
The credit goes to the good people of Primefaces Forum:
这篇关于从p:layout移除装订线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!