• Resolved Kathy Jones

    (@kathy-jones)


    I read the documentation about changing the width of tables by adding the CSS code, but I am not sure I understand it correctly. I have a table with four columns and would like to change the width of two of the columns. If the width of the table is 100%, I would like to have two of the columns narrow and two wider. Ideally I would like a 50/25 ratio for the two sets of columns. The first one would be 25%, second 25% and then the other two columns would be the same ratio of 25% to 50%. How would I accomplish that? Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Kathy Jones

    (@kathy-jones)

    The page I am working with is http://www.qbfhs.ca/genealogy-resources/canadian-genealogy-research-records/provincial-resources/ The table is too wide and is going into the right sidebar. I did try changing the rows in CSS as per your instructions. But it did not make any changes that I need. Should I be adding less percentage for these two rows? Thank you.

    .tablepress-id-24 .column-1 {
    width: 120px;
    }

    .tablepress-id-24 .column-3 {
    width: 120px;
    }

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question, and sorry for the trouble.

    If tables extend into the sidebar, the solution is a bit more complex than setting column widths, unfortunately. This is due to the way how width calculation for tables is done by the web browser.

    In your table, columns 1 and 3 only show a small text link, so those can be made smaller. However, this is not possible with column 3, as the last row has its image in that column (to be centered on the page, I assume).
    I therefore suggest to move the map in the last row to the left as well.
    After that, you can add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress-id-24 .column-1,
    .tablepress-id-24 .column-3 {
      width: 100px;
    }

    This should make the text columns smaller.

    Regards,
    Tobias

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Table Press Column Widths’ is closed to new replies.