gpt4 book ai didi

css - 如何给 h :panelGrid 添加样式

转载 作者:太空宇宙 更新时间:2023-11-04 05:00:16 27 4
gpt4 key购买 nike

我有一个包含两列的面板网格,我想将右列文本居中对齐,左列文本向左对齐。

我试了一遍又一遍,但还是不行

<pe:layoutPane position="south" resizable="false" closable="false" statusbar="true" spacing="0">
<h:panelGrid columns="2" styleClass="left,centered" width="100%">
<h:outputText value="DEV"/>
<h:panelGroup>
<h:outputText value="Developed by "/>
<h:outputLink id="link1" value="mailto:to@mm.com" >
<h:outputText value="text" style="text-decoration:underline"/>
</h:outputLink>
</h:panelGroup>
</p:panelGrid>
</pe:layoutPane>

这是CSS:

 .centered  {
margin: 0px auto;
text-align: center;
}


.left {
float: left;
}

知道如何存档此布局吗??

谢谢

最佳答案

你应该更好地使用

<h:panelGrid columns="2" columnClasses="left,centered">
...
</h:panelGrid>

您好!

关于css - 如何给 h :panelGrid 添加样式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11661465/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com