2011-09-01 20 views
0

JSF/CSS /特立尼達CSS爲的<h:panelGrid的

注 - 這三者是從IBM ILOG遞送的一部分並且不能被改變

JSF 1.2-1.2_07-B03-FCS

JSTL 1_1-MR2(特殊版本)

特立尼達1.2.8

的Java 1.6.0_22-B04

的Eclipse 3.6.0(太陽神)

的Tomcat 6.0.28(需要同時運行EJB)

IE 7.0.5730.13

火狐:6.0

在JSF適度的經驗,幾乎沒有在CSS中。

JSP文件: ...

<tr:form> 
     <h:panelGrid 
      columns="2" 
      border="2"> 

      <h:panelGrid 
       style=" 
        background-color: Yellow; 
        bottom: 0px; left: 0px; right: 0px; top: 0px; 
        width: 150px"> 
      <tr:outputLabel 
       inlineStyle="font-size: 16px" 
       value="#{msg.activityType}" 
       for="activityType" 
       shortDesc="#{msg.titleFreqToolTipActivityType}"/> 
      </h:panelGrid> 
<!--... more panel grids-->   
     </h:panelGrid> 
    </tr:form> 

標籤顯示一個黃色backgound

切換到這一點 -

JSP文件: ...

<tr:form> 
     <h:panelGrid 
      columns="2" 
      border="2"> 

      <h:panelGrid 
       styleClass="panelGridA">  
      <tr:outputLabel 
       inlineStyle="font-size: 16px" 
       value="#{msg.activityType}" 
       for="activityType" 
       shortDesc="#{msg.titleFreqToolTipActivityType}"/> 
      </h:panelGrid>   
<!--... more panel grids--> 
     </h:panelGrid> 
    </tr:form> 

CSS文件:

panelGrid.panelGridA { 
    background-color: Yellow; 
    bottom: 0px; left: 0px; right: 0px; top: 0px; 
    width: 150px;" 
} 

結果不是黃色,忽略格式。

這種類型的代碼與dataTable一起工作,所以有點莫名其妙。

想法?

感謝, 約翰

回答

1

刪除panelGrid中的CSS選擇或改變table.panelGridA, H:panelGrid的被渲染到HTML表格

此外,添加的重要標記,此改變其他!建在你可能有的CSS)

.panelGridA { 
    background-color: Yellow !important; 
    bottom: 0px; left: 0px; right: 0px; top: 0px; 
    width: 150px;" 
} 
+0

它的工作原理。謝謝。 –