• Resolved crosstherubicon

    (@crosstherubicon)


    I need to know what controls column widths. No matter how I set up a table – importing a CSV file from Excel or setting it up manually – the columns have no sensible display. Doesn’t matter how much or how little content is in the cells. I’ve tried moving the columns around and it just seems like the cell widths change. Don’t really want to go into CSS. What is the logic for column widths and how they are calculated? I think this is one of the better plugins other than this, very powerful and good stuff.
    Thanks!

    http://ww.wp.xz.cn/plugins/tablepress/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi,

    thanks for your question.

    The column widths are calculated automatically by each browser (and not by TablePress), and they depend on several factors, but most importantly the amount of content in the cells in each column.

    Changing them is possible with some easy CSS code, which you can find in the answer to the question “How can I set column widths?” in the TablePress FAQ at http://tablepress.org/faq/

    Regards,
    Tobias

    Thread Starter crosstherubicon

    (@crosstherubicon)

    Tobias,

    I went into the plugin options CSS and got it working just the way I want. It was pretty easy actually. You wrote a great plugin, one of the better ones out there.

    Thanks,

    David

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi David,

    awesome! Great to hear that you got the CSS to work 🙂
    And thanks for the kind words, I really appreciate it!

    Best wishes,
    Tobias

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

    Thread Starter crosstherubicon

    (@crosstherubicon)

    Tobias,

    I am having a difficult time adjusting the column widths for a new table. I have inserted the appropriate code in the Custom CSS area but it doesn’t work –

    So, the table that does work is at –
    http://rosebrook.wickenburgaz.biz/available-vendor-opportunities/
    It is table 2

    The table that isn’t working correctly is at –
    http://rosebrook.wickenburgaz.biz/location/
    It is table 3

    Here is what is plugged into the Custom CSS area –

    .tablepress-id-2 .column-1 {
    width: 80px;
    padding: 4px;
    }

    .tablepress-id-2 .column-2 {
    width: 80px;
    padding: 4px;
    }

    .tablepress-id-2 .column-3 {
    width: 80px;
    padding: 4px;
    }

    .tablepress-id-3 .column-1 {
    width: 40px;
    padding: 4px;
    }

    .tablepress-id-3 .column-2 {
    width: 40px;
    padding: 4px;
    }

    Any ideas?

    Thanks for your help again!

    David

    Plugin Author Tobias Bäthge

    (@tobiasbg)

    Hi David,

    thanks for your question, and sorry for the trouble.

    The problem basically is that the table still stretch to full width, even with individual columns getting a width assigned. To change that, you need to tell the table to not stretch, by adding this:

    .tablepress-id-3 {
      width: auto;
    }

    Regards,
    Tobias

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

The topic ‘Column widths’ is closed to new replies.