WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Column Width

[Resolved] Column Width

  • 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/

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

    @tobiasbg

    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

    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!

    Plugin Author TobiasBg

    @tobiasbg

    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

    Perfect!! Thanks again for your help!

    Plugin Author TobiasBg

    @tobiasbg

    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!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Resolved] Column Width’ is closed to new replies.