• Resolved gustav.sommer

    (@gustavsommer)


    Hi!
    The option column_widths does not work on my page

    [table id=4 responsive=collapse datatables_buttons="pdf,print,excel"?column_widths="200px|100px|200px" /]
    or
    [table id=3 responsive=collapse datatables_buttons="pdf,print,excel" column_widths="40%|20%|40%"?/]

    What can be the reason?

    Thank You!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter gustav.sommer

    (@gustavsommer)

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    I would recommend against using this column_widths parameter here. It’s not really a good solution nowadays. Instead, you should use the CSS approach from https://tablepress.org/faq/column-widths/
    This will most likely not solve the problem, however. The problem actually is those very long URLs in the first column of your tables. As these don’t contains spaces (Leerzeichen) or hyphens (Bindestrich) in the link text, the browser treats them as one very long word and can not add a line break. Due to this the width of the first column is so big.
    We could however change this behavior with some other CSS. Can you please try to add this to the “Custom CSS” textarea on the “Plugin Options” screen of TablePress:

    .tablepress-id-3 .column-1 {
        word-break: break-all;
    }

    Regards,
    Tobias

    Thread Starter gustav.sommer

    (@gustavsommer)

    Hi Tobias!
    Thanks for your quick and very good response.
    Your suggestion works very well.
    The CSS-code I have inserted for all seven tables.
    My seven tables now look very good and are user friendly.
    Great – you are the best!

    kleiner Wehrmutstropfen: Die langen Links funktionieren in den PDF-Tabellen nicht mehr. Aber damit kann ich leben, da Sie beim Excel-Knopf funktionieren.
    Small drops of vermouth: ?? The long links no longer work in the PDF tables. But I can live with this because it works with the Excel-Button very well.

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    good to hear that this works! ??

    Yeah, this is a PDF export problem, for which I don’t know a solution, unfortunately ??

    Best wishes,
    Tobias

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Option column_widths Problems’ is closed to new replies.