我使用一个简单的h:panelGrid
来显示该表,如何为该表指定样式以使其更好。我有点困惑于我在网上看到的所有东西--这就是我一直在使用的代码
<h:panelGrid id="panel" columns="2" cellpadding="10"
cellspacing="1" style="align:center;">
<f:facet name="header">
<h:outputText value="Registration" />
</f:facet>
<h:outputText value="User Name:" escape="false" />
<h:inputText value="Hello World" />
<h:outputText value="Password:" escape="false" />
<h:inputSecret value="" />
</h:panelGrid>
请您指定可操作的opton列表,以便为jsf中的元素指定css或内联样式,谢谢。
发布于 2015-05-09 08:44:49
不要尝试使用内联样式。由于jsf在这方面是一个html代码生成器,因此内联样式不适用于您希望应用它们的html元素。使用styleClass
属性,并为您想要样式的html元素创建具有正确选择器的css。在这些选择器中使用已修复的类。
也见
https://stackoverflow.com/questions/30136972
复制相似问题