3 Replies Latest reply on Aug 29, 2008 2:04 PM by shadowcreeper

    padding, dataTable

    barbazu

      when you place rich:dataTable with width set to 100% in div with padding set to value other than 0px, the dataTable is bigger then div and overflows.
      how can I force dataTable to fit into div ?

      [img]http://www.vpx.pl/up/20080826/ss1.jpg[/img]

        • 1. Re: padding, dataTable
          shadowcreeper

          Do set width="100%" or style="width: 100%;" ???

          I always use styleClass="fullWidth" (the same as the 2nd one above).

          Usually when I find this behavior, I can swap out a padding with a margin and it works fine. Have you tried the div with no padding and the table with a margin?

          • 2. Re: padding, dataTable
            barbazu

            Neither style="width: 100%;" nor styleClass="fullWidth" solved my problem.

            The second advice you gave me works fine ;)
            Thanks for your time.

            • 3. Re: padding, dataTable
              shadowcreeper

              I defined fullWidth in my CSS file as ".fullWidth { width: 100%; }", I just have a whole bunch of simple things like that to tack on wherever I need them. Other examples are "invisible", "fullHeight", "blockCenter" (for divs -- ".blockCenter { margin-left: auto; margin-right: auto }"), etc.

              Also, I believe width="100%" just sets the style width to 100% anyway, so I didn't expect any changes there. However, sometimes the components will use javascript to figure out the exact width and height they need and set them in pixels from that.