• Resolved wallym

    (@wallym)


    Hello Tobias,
    I have added the following code to the css section in the table press plugin options:

    .tablepress-id-99 .column-7 {
    width: 600px;
    }

    I have tried the code on another table, and it worked. However, it does not work on this particular table.
    Any ideas on why the code is not working? Thanks.

    The goal is to make column 7 of table 99 shorter because the text makes some rows very long. If you know of another solution, please let me know.
    All the best.

    • This topic was modified 1 year, 11 months ago by wallym.

    The page I need help with: [log in to see the link]

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

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    The reason why this is not working here is that your table is already too wide for the screen to fit. The browser therefore doesn’t really want to make that column even wider. However, you can force that, by using a slightly extended version of your code:

    .tablepress-id-99 .column-7 {
      width: 600px;
      min-width: 600px;
    }

    You might then also want to look into using an approach to make the table responsive on small screens. See https://tablepress.org/extensions/responsive-tables/ for some ideas.

    Regards,
    Tobias

    Thread Starter wallym

    (@wallym)

    Thank you so much. It worked!
    I will also explore the different options available with the resposive tables plugin.
    All the best.

    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!

    Thread Starter wallym

    (@wallym)

    By the way, I tried the scroll function with the “responsive tables” add-on. I wanted to implement the “scroll” function, but it does not seem compatible with the “fixed header” function. With “fixed header” , only the table cells move, so they lose their alignment with the header cells. So, I will leave it as an extra-wide table that moves off the page with “fixed header” only, like in https://www.naturalmattressfinder.com/latex-mattresses-in-canada/ .

    I am afraid that if I remove the “fixed header” on the large tables, and the visitor is looking at the page on a small screen, he will no longer know what he is looking at, since the header is no longer in view to identify the column.

    All the best.

    Plugin Author TobiasBg

    (@tobiasbg)

    Hi,

    you are right, the “Fixed Header” feature is currently not compatible with horizontal scrolling. ??

    However, good news ahead: TablePress 2.0, coming before Christmas, will feature this as part of a premium plan, so that this will then be possible ??

    Regards,
    Tobias

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unable to set cell width’ is closed to new replies.