I am looking forward to customize the look of tabView component. I need to change the color of tab headers(& if possible, 2 different colors for 2 different headers). I 开发者_如何学编程tried to do so by specifying the CSS rules through styleClass attribute for tabView but failed to see desired results.
How I can achieve this ?
3.0.M2 has titleStyle and titleStyleClass attributes for tab component.
http://code.google.com/p/primefaces/issues/detail?id=892
Primefaces components get the look&feel from a css theme. You can either:
Build your own theme with the desired colors with Themeroller,
Change the style classes for your theme manually. Style classes for each Primefaces component are listed in the Primefaces documentation. Since the doc is not free for most recent Primefaces version 2.2 I can only help your with the classes from Primefaces 2.1: .ui-tabs, .ui-tabs-nav, .ui-tabs-panel. Notice that there might be more style classes applying to the tab view inherited from other components. Check html source of the tabView to get all applying classes.
Use the
style
orstyleClasses
attribute as described in your answer and overwrite the theme classes with the!important
declaration
精彩评论