【问题标题】:Primefaces tabView header size incorrect in combination with accordionpanelPrimefaces tabView 标题大小与手风琴面板组合不正确
【发布时间】:2015-03-03 19:00:31
【问题描述】:

我遇到了一个 p:tabView 显示在 p:accordionPanel 旁边的问题。 tabView 的 header 占据了与整个手风琴面板相同的垂直大小。

最初是在模板客户端中。我已将其简化为以下演示:

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://xmlns.jcp.org/jsf/html">
    <h:head>
    </h:head>

    <h:body>
        <div>
            <div id="left" style="float: left">
                <p:accordionPanel>
                    <p:tab title="Accordion">
                        X<br/> 
                        Y<br/>
                        Z<br/>
                    </p:tab>
                </p:accordionPanel>
            </div>
            <div id="right" style="margin-left: 150px">
                <p:tabView>
                    <p:tab title="tabOne"> one </p:tab>
                </p:tabView>
            </div>
        </div>
    </h:body>
</html>

我正在使用 PrimeFaces 5.0、GlassFish 4.1

【问题讨论】:

    标签: jsf primefaces


    【解决方案1】:

    为 p:tabview 尝试以下样式属性

    <p:tabView style="display: inline-block; width: 100%">
          <p:tab title="tabOne"> one </p:tab>
    </p:tabView>
    

    【讨论】:

    • 谢谢。为我工作。现在回到文档以了解原因。
    • PF 文档不会向您显示这一点。关于使用 float 的 css 规范可能。完全与 PF 无关
    猜你喜欢
    • 1970-01-01
    • 2017-02-27
    • 2016-01-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-09-06
    • 1970-01-01
    相关资源
    最近更新 更多