2012-07-26 69 views
0

我有兩列的面板網格,我想對準中央的右列文本和左邊的列文本左。如何樣式添加到h:panelGrid的

我嘗試一遍又一遍用它玩,但它仍然不工作

<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:[email protected]" > 
          <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; 
} 

任何想法,我怎麼會存檔這樣的佈局?

感謝

+0

這是你想要實現columnClasses =「左,居中」? – StephenMeyer 2012-08-23 12:25:44

回答

0

我找到了解決辦法:)

 <center> 
        <h:outputText value="DEV" style="float: left" styleClass="footer"/> 
        <h:outputText value="xxxxxxx" styleClass="footer"/> 
        <h:outputLink id="link1" value="mailto:[email protected]" styleClass="footer"> 
         <h:outputText value="xxx" style="text-decoration:underline" styleClass="footer"/> 
        </h:outputLink> 
       </center> 
+5

'

'元素自1998年HTML 4.01以來已棄用。 – BalusC 2012-07-26 04:47:42

2

,你應該更好地利用

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

的問候!