Support » Plugin: TablePress » Impossible to change a column width

  • Resolved kicooo

    (@kicooo)


    Hola Tobias,

    I am quite desperate. I am trying to change/adapt a column width, but I cannot. I tried all the things here around but it does not change.

    I wrote the following code, for instance, on the Custom CSS from the plugin and also from the Customizer (theme):

    .tablepress-id-9 .column-2 {
    width: 100px;
    }

    I also tried adding the !important sufix, but nothing changed.

    Any idea?

    Thank you!

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Can you please post a link to the page with the table where this problem happens, so that I can take a direct look? Thanks!

    Regards,
    Tobias

    tystewart888

    (@tystewart888)

    Hello, I am having problems with this as well. When I apply the above CSS it adds a bunch of unnecessary space to the height of the rows.

    I published this page with explanation and examples.

    Example TablePress with column width issue

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    from what I can see, you want to reduce the overall width of the table, right?
    For that, please try this CSS:

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

    Regards,
    Tobias

    tystewart888

    (@tystewart888)

    thanks Tobias. I applied this change but I’m still getting the extra space in the rows as you can see on the updated link below.

    Example TablePress with column width issue

    Ideally, I’d like the entire width of this table to be a little smaller (400px) and not have the lines of the table continue to extend off to the right like they do now. Is that possible? I would then center the smaller table on the page.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    can you please try that code again (and leave it in the “Custom CSS”)? It’s working for me when I try with the Google Chrome Developer Tools…
    To then center the table, you can then extend the code to

    .tablepress-id-47 {
      width: auto;
      margin: 0 auto 1em;
    }

    Regards,
    Tobias

    tystewart888

    (@tystewart888)

    just to confirm, you mean in the custom CSS area of the TablePress plugin, correct? as seen in screenshot in below link? I’m still getting same behavior. I tried different browsers (Chrome, IE, Firefox) also in case there was a caching issue.

    https://www.dropbox.com/s/xow4t79flezve2b/TablePress.JPG?dl=0

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    yes, that’s correct. I found a possible cause for why the CSS is not applied: It seems that the minified CSS files are not saved properly.
    Can you please delete the three files tablepress-custom.css, tablepress-minified.css, and tablepress-combined.css from the wp-content folder on your server? After that, please save the “Custom CSS” again.

    Regards,
    Tobias

    kristapcyi

    (@kristapcyi)

    Hi Tobias,

    Thanks for creating this plugin!
    I am also having trouble modifying my column width. I have a very simple table. It’s on a draft page so you can view a screenshot here: https://www.dropbox.com/s/uyf6m7aybe7ypu2/Table_screenshot.jpg?dl=0

    I’ve tried this in the plugin’s custom CSS:

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

    I have tried different px widths but the table will not change.

    I have also tried:

    .tablepress-id-1 .column-1 {
    width: auto;
    }

    Basically I want the column/table width to be about the width of the text.

    As a separate question, eventually I want to move the table beside text and have it right justified. Is that an option?

    Thank you.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    please try

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

    (or a pixel value then). You’ll have to set the width of the table, and not of the column.

    To move it to the right and right-align it, you can try

    .tablepress-id-1 {
      width: auto;
      float: right;
      text-align: right;
    }

    Regards,
    Tobias

    Thread Starter kicooo

    (@kicooo)

    Hi,

    Sure, here is the link of one table. I want to change the first column width but I couldn’t.

    Public Holidays in Spain

    Thank you

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi kicooo,

    you seem to be affected by a bug in the “Horizontal Scrolling” feature. Can you please try again after turning off that checkbox on the “Edit” screen of the table? To then get horizontal scrolling back, you could try the scroll mode of the TablePress Extension from https://tablepress.org/extensions/responsive-tables/, which uses a slightly better technical mechanism.

    Regards,
    Tobias

    kristapcyi

    (@kristapcyi)

    Thank you, Tobias! Worked perfectly.

    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!

    tystewart888

    (@tystewart888)

    Hi Tobias, I had my hosting company (WordPress) go in and delete those files and then re-added the custom CSS and saved like you said. Unfortunately I’m still getting the same behavior.

    Example TablePress with column width issue

    any other ideas what could be causing it?

    tystewart888

    (@tystewart888)

    I meant WP Engine for hosting company.

Viewing 15 replies - 1 through 15 (of 34 total)
  • The topic ‘Impossible to change a column width’ is closed to new replies.