Support » Plugin: TablePress » Table Width Set

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author TobiasBg

    (@tobiasbg)

    Hi Greg,

    thanks for your question.

    The reason for this is that in tables, the content determines the minimum width. In your case, you have four columns with images in them. The images are all 189px wide each, according to their width attribute in the HTML. Addtionally, each of the cells has a 8px padding on its inside (which shows as the white space around the image). Thus, each cell is 205px wide, and in sum, the table is therefore 4*205px = 820px wide.
    You’ll just have to make the images one pixel smaller, or reduce the padding of the cells, that’s it.
    There’s no need to edit the width of the table, as that will extend to 100% of the width of the content area (which is 816px) by default (except for your case where the content requires are larger minimum width of 820px).

    Regards,
    Tobias

    Hi Tobias,

    Wow–speedy reply–wish all forums had people like you answering questions!

    Anyway, I am still confused.
    First where do I remove the 8px padding in the table cells?

    I want to force the table size to 816 pixels–right now it appears to be about 807 pixels wide. My client needs it to be 816 pixels wide. So if I removed the 8px padding, I think it would get smaller, not bigger.

    Thanks again in advance!
    Greg

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    sure, no problem for the reply 🙂

    Removing that padding is possible with some “Custom CSS”:

    .tablepress-id-1 td {
      padding: 0px;
    }

    This will lead to the table being 4*189px = 756px wide. Right now, it is 820px wide (I checked that with the Google Chrome Developer Tools), but as the padding is of course on the very left and the very right, it might appear smaller.

    Regards,
    Tobias

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Table Width Set’ is closed to new replies.