【问题标题】:p:layoutUnit ignore the margin-topp:layoutUnit 忽略 margin-top
【发布时间】:2018-10-15 20:20:22
【问题描述】:

我的问题很简单。我正在使用PrimeFaces 3.0 和 layoutUnit 组件。

Myxhtml

<p:layout fullPage="true" locale="fr">
  <p:layoutUnit position="north" scrollable="false" resizable="false" size="60" locale="fr">
    <ui:insert>
      <ui:include src="../agenda/commons/menuView.xhtml"></ui:include>
    </ui:insert>
  </p:layoutUnit>
  <p:layoutUnit position="center" scrollable="false">
    ...

结果是这样的:

当我检查页面时,我创建了两个div,但我无法编辑它们。

检查代码图像

div 来自哪里以及如何编辑它们。

【问题讨论】:

  • PrimeFaces 3.0 已经很老了,如果可以的话你应该升级。但是,如果您不能,您应该尝试覆盖样式 ui-layout-pane-north 或类似样式。布局在每个窗格中都有样式,以便为您提供挂钩。与所有 CSS 一样,您必须尝试使用​​它。
  • 除了@Melloware 的评论,请注意 p:layout 已被弃用。 stackoverflow.com/questions/50801954/…

标签: html css jsf primefaces


【解决方案1】:

我在这篇帖子How can I set the height in layoutUnit of primefaces? 找到了解决方案

myXHTML

<style>
.westUnit {
height: 124px !important;
}

.westUnit1 {
height: 101px !important;
}
</style>


...
<p:layout fullPage="true" locale="fr" styleClass="westUnit">

    <p:layoutUnit position="north" scrollable="false" resizable="false"
        styleClass="westUnit1" size="60" locale="fr">

        <ui:insert>
            <ui:include src="../agenda/commons/menuView.xhtml"></ui:include>
        </ui:insert>

    </p:layoutUnit>
 ...

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2011-09-19
    • 2010-09-22
    • 2013-09-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多