• Resolved valentinteruggi

    (@valentinteruggi)


    Hi, the website I am adding this table is https://es-prof.delta-cloud.com/training-inventory/

    I have tried to change the width by using the shortcode [table id=1 column_widths=”100px|100px|100px|100px|100px|100px” /], using the CSS editor, using the additional css in WordPress, and nothing seems to work:

    This is my css:
    .tablepress-id-1 .column-1,
    .tablepress-id-1 .column-2,
    .tablepress-id-1 .column-3,
    .tablepress-id-1 .column-4,
    .tablepress-id-1 .column-5,
    .tablepress-id-1 .column-6 {
    width: 100px !important;
    }

    I have been playing around with the console and nothing modifies the width.
    Please help

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

Viewing 1 replies (of 1 total)
  • Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Can you maybe explain what you are trying to achieve by setting the widths? Essentially, the problem you are running into is that the “Web link” column is very wide, as links are normally treated as one very long word, without word-wrapping. My recommendation therefore is to change these URLs to clickable links, with a short link text. The table will look much nicer then.
    One quick way to achieve that could be to add this to the “Custom Commands” text field on the table’s “Edit” screen:

    "columnDefs": [ { "render": function ( data, type, row, meta ) {
      if ( 'display' === type ) {
        data = '<a href="' + data + '">Website</a>';
      }
      return data;
    }, "targets": [ 5 ] } ]

    Regards,
    Tobias

Viewing 1 replies (of 1 total)
  • The topic ‘Width Columns does not work’ is closed to new replies.