WordPress.org

Forums

TablePress
[resolved] Column Width (7 posts)

  1. tiger2deuce
    Member
    Posted 1 year ago #

    Hey Tobias,

    I have been going through the support forum trying to figure out how to change the column widths in my tables. I think I've tried all the possible solutions but cannot seem to get my column widths to change. I am using the theme Weaver II. Not sure if that is the problem. I've included a link to one of my tables. I am trying to get the Conference Record and Overall Record field columns to be much smaller... to where the records look like "28-11" instead of "28 - 11". Right now, I have the 28, -, and 11 in three separate columns. Can you help me out with this?

    Thanks so much,
    Kris

    https://wordpress.org/plugins/tablepress/

  2. tiger2deuce
    Member
    Posted 1 year ago #

  3. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for your post, and sorry for the trouble.

    First: Why do you have "28", "-", and "11" in separate columns, if you want them to appear together?

    Now, regarding the widths: Instead of changing those, it should be much easier to change the "padding" first (the white space between the cell content and the cell edges/borders), with this "Custom CSS":

    #content .tablepress th,
    #content .tablepress td {
      padding: 8px;
    }

    Can you please try that?

    Then, you might also want to use colspanning here in the header row:
    Please add

    #colspan#

    into the two empty cells directly on the right of "Conference Record" in the header row.

    Regards,
    Tobias

  4. tiger2deuce
    Member
    Posted 1 year ago #

    Hey, thanks for the response! It works pretty well. I'd like to try and make the columns just a bit smaller, but I think I can go with your fix. I put the numbers in separate columns because I want to use the cells in a formula. For instance, the 28-11 is a team's record and I'm using another cell to calculate winning percentage (i.e. 28/(28+11)/2=0.718). If you had any other suggestions, I'd would definitely appreciate the assistance!

  5. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    ah, that makes sense. Yes, if you want to use the numbers in formulas, you'll need to use separate cells here.

    To now move the columns even closer together, you can reduce their widths, with this "Custom CSS":

    .tablepress-id-GAC-ST .column-2,
    .tablepress-id-GAC-ST .column-4 {
     width: 14px;
    }
    .tablepress-id-GAC-ST .column-3 {
     width: 4px;
    }

    Regards,
    Tobias

  6. tiger2deuce
    Member
    Posted 1 year ago #

    Perfect!! Thanks again for your help!

  7. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    no problem, you are very welcome! :-) Good to hear that this helped!

    Best wishes,
    Tobias

    P.S.: In case you haven't, please rate TablePress here in the plugin directory. Thanks!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • TablePress
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic