• Resolved stressor

    (@stressor)


    Hi, I am new to this wonderful plugin, my table (“nutrition”) should be roughly half page size (“constrained” size) ending about where the search bar ends. However the long sentences seem not to wrap in the cell…forcing the table very wide. I tried custom CSS without luck eg

    table.tablepress.nutrition {
    width: 50% !important;
    }

    table.tablepress.nutrition {
    width: 800px !important;
    }

    I also tried

    table.tablepress.nutrition .column-2 {
    word-break: break-word;
    }

    I also notice some cells in column 2 contain “<div class=”softmerge-inner” style=”width:1144px;left:-1px”>” but others do not. Could this be causing the issue?

    I welcome any help; thanks!

    • This topic was modified 2 years, 9 months ago by stressor.
    • This topic was modified 2 years, 9 months ago by stressor.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Those inline style rules are definitely the problem.

    Can you investigate and find out how those inline rules are being added?

    Thread Starter stressor

    (@stressor)

    Thank you Jeff. I removed all those extra html using a search and replace function (chrome add-in)……and you were right, I think the table is formatting correctly!

    I am not sure how this html is being added because I am importing directly from a google sheet using > share/publish to web as html > tablepress import as html.

    I can import as CSV but I was having problems when the table contained line breaks and images, that is why I used import as html

    any additional insights appreciated!

    Plugin Author Tobias B?thge

    (@tobiasbg)

    Hi,

    thanks for your post, and sorry for the trouble.

    Indeed, as Jeff said, those inline styles caused this trouble. Essentially, they were forcing the cells to be very wide (1144px, at least), and this width then gets priority by the browser over the table width that you asked for with your “Custom CSS”.

    Good to hear that removing this HTML fixed things! ??

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Trouble with table size and text wrapping’ is closed to new replies.