9 Replies Latest reply on Mar 7, 2011 4:36 AM by snaker

    rich:Panel style

    basharf

      Hello all,

       

      I was able to change the width of a rich:tabPanel and a rich:dataTable .... but not with the   rich:panel ...

       

      does any one know why ?

       

       

      <rich:panel id="bk" styleClass="#bk">

       

      #bk {

       

      width: 200px;

      }

       

      but nothing happens .. any clues ?

       

      Thanks.

        • 1. rich:Panel style
          boy18nj

          you are doing it wrong way, do this way-

           

          <rich:panel id="bk" class="width : 200px;">

          • 2. rich:Panel style
            basharf

            Oh I see !!

            Thanks for the help ..  but what if I have more than one style I mean, if i want to control the width, height, color .... etc ..

             

            cant I depend on my way ?

             

            Thank you

            • 3. rich:Panel style
              gonchar

              Hi!

              Attributes styleClass and class is not necessary, cause id selector has been used.

               

              <rich:panel id="bk">

               

              #bk {

               

              width: 200px;

              }

              • 4. rich:Panel style
                basharf

                but it didnt take the effect  when I used with the id .. I dont know why

                • 5. rich:Panel style
                  gonchar

                  Debug for example in Firebug and check id, is it realy "bk"

                  1 of 1 people found this helpful
                  • 6. rich:Panel style
                    gonchar

                    ...

                    <style>

                         #test {

                              width: 200px;

                     

                         }

                    </style>

                    <rich:panel id="test"></rich:panel>

                    ...

                     

                     

                    I've tried like i suggested and it works!

                    1 of 1 people found this helpful
                    • 7. rich:Panel style
                      snaker

                      if you use that:

                       

                      <rich:panel id="bk" styleClass="#bk">

                       

                      #bk {

                       

                      width: 200px;

                      }

                       

                      I supose #bk is in a css class, if use "#" only need id ofr rich:panel, you don't need styleClass, but i don't know why with richfaces for id doesn't work, so you must put:

                       

                      <rich:panel id="bk" styleClass="bk">

                       

                      In the ccs class:

                       

                      .bk{

                           width:200px;

                           ...

                           ...

                           backgroud-color:lightgray;

                           color: red;

                      }

                       

                      it works.

                      if you use a header you must overwrite the class of richfaces (panel) because styleClass only is for the panel body

                      • 8. rich:Panel style
                        basharf

                        I  understand

                         

                        Thanks a lot Vitaliy Gonchar and Kike Gil for clreaing it in details .... it works now 

                        • 9. rich:Panel style
                          snaker

                          finally, how do you do?

                           

                          for id??