2 Replies Latest reply on Aug 2, 2007 3:51 AM by smokingapipe

    rich:simpleTogglePanel width

    smokingapipe

      Stupid question:

      I have put the following in my CSS file:

      .rich-panel {
       margin: 10pt;
       clear: both;
      }
      
      .rich-stglpanel {
       margin: 10pt;
       clear: both;
      }
      


      And yet the SimpleTogglePanel's right side goes all the way to 100%, instead of having the 10pt margin on the right side. It's strange because the RichPanel is fine, and the left margin of both is fine, but the right margin is blowing out.

      Any ideas? By the way, inside the RichSingleTogglePanel, I tried a couple of simple paragraphs, a couple of spans, a couple of divs... all the same results.

      Also the SimpleTogglePanel is showing me a horiz. scrollbar at the bottom, even when there isn't enough content to scroll horizontally.

      I know that I can put a width="x%" parameter in the simpleTogglePanel tag, but I really don't want to use a percentage. I want it to be the same width as the rich panel.

      I've tried a ton of different things and there seems to be no easy way to control this. Is there a way to control the width of this other than using the percentage parameter?


        • 1. Re: rich:simpleTogglePanel width
          smokingapipe

          I sort of figured out a solution. Put the whole simpleTogglePanel into a div, and put the style on that enclosing div, and it works. I'm wondering if there is a better way though. Nested divs are becoming as ugly as nested tables of old.

          • 2. Re: rich:simpleTogglePanel width
            smokingapipe

            I figured out the trick: if there is no width param specified, it defaults to width=100%. I think that is a bug. I put in width="" (literally, width is an empty string) and then it all worked perfectly. Is this a bug?