Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change header styleClass of a panel

Tags:

jsf

primefaces

I have panels and would like to change the header's background color of only one of them. Thus I can't juste change the ui-panel-titlebar style.

I tried the following without success.

<p:panel ....>
    <f:facet name="header" styleClass="ui-panel-my-titlebar">
        ....
    </f:facet>
</p:panel>

If I put the styleClass in the p:panel tag, then is the background of the content change too.

My styleClass:

.ui-panel-my-titlebar {
    background: #BBBBBB;
}
like image 867
jobe Avatar asked Oct 18 '25 13:10

jobe


1 Answers

I got it to work with the following:

<p:panel styleClass="customTitleBar">
  <f:facet name="header">
    ....
  </f:facet>
</p:panel>

css:

.customTitleBar > .ui-panel-titlebar {
    background: #BBBBBB;
}
like image 89
LucasP Avatar answered Oct 22 '25 04:10

LucasP