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

    padding, dataTable

    Tomasz ?liwa Newbie

      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 ?


        • 1. Re: padding, dataTable
          shadowcreeper Apprentice

          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
            Tomasz ?liwa Newbie

            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 Apprentice

              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.