7 Replies Latest reply on Oct 25, 2010 7:10 AM by osvaldogomez

    only one rich:tab style

    osvaldogomez

      Hi, I'm wonder if is possible to assign a different style only for one tab. I'm using blue sky skin, but for an specific reason, I need only one of the tabs looks green. Could I do this?.... how?

       

       

       

       

       

       

       

      thanks in advance

        • 1. Re: only one rich:tab style
          sivaprasad9394

          yes it is possible use like this,

           

          <rich:tab  styleClass="testing-tab-color">

          ......

          .......

          </rich:tab>

           

          In css file add this code,

           

          .testing-tab-color

          {

          color: #FFFFFF;

          background-color: #008000;

          }

           

           

           

          .testing-tab-color
          {
          color: #FFFFFF;
          background-color: #008000;
          }

          • 2. Re: only one rich:tab style
            osvaldogomez

            My apologies for not being clear enough, but actually I need change the style of tab not of the all panel

            • 3. Re: only one rich:tab style
              sivaprasad9394

              yes if you use those code your tab background will be green and text color inside the tab is White.You can set it for different color for different tab if it is required.

              styleClass="testing-tab-color"

               

              This is your Question,

              "Hi, I'm wonder if is possible to assign a different style only for one tab. I'm using blue sky skin, but for an specific reason, I need only one of the tabs looks green. Could I do this?.... how?"

              • 4. Re: only one rich:tab style
                ilya_shaikovsky

                if you mean just tab header as I gues.. try the same but using headerClass attribute

                • 5. Re: only one rich:tab style
                  osvaldogomez

                  Hi Ilya,

                   

                  You're right but when I assign headerClass I´m changing the style of alls tab header, and I really need just one of them

                  • 6. Re: only one rich:tab style
                    ilya_shaikovsky

                    sorry, not headerClass of tabPanel but styleClass of tab for sure.

                    • 7. Re: only one rich:tab style
                      osvaldogomez

                      .cabeceraTab{
                      background-color:green;
                      font-size: 10px;
                      color: gray;
                      font-weight: bold;
                      }

                       

                      <rich:tabPanel switchType="client"  >               
                      <rich:tab styleClass="cabeceraTab">
                      <f:facet name="label">Tab 1</f:facet></rich:tab>
                      the 1st tab                   
                      <rich:tab label="TERCEROS" name="TERCEROS" >
                      TERCEROS            
                      </rich:tab>
                      <rich:tab label="TRANSPORTE" name="TRANSPORTE">
                      TRANSPORTE
                      </rich:tab>             
                      </rich:tabPanel>

                       

                      ScreenHunter_02 Oct. 25 08.04.gif

                       

                      OK?

                       

                      I don't need the panel in color green, just the header, and just the first tab. Panel should be white. Could I paint the first tab header in green? others header tabs should be blue, panels tabs white. Could I do this?. Could you give some example if it is possible?

                       

                      Thanks in advance!