locked
Wrap Text RRS feed

  • Question

  • User-797751191 posted

    Hi

      How to Wrap column text in Html table

    Thanks

    Thursday, July 4, 2019 10:33 AM

All replies

  • User753101303 posted

    Hi,

    Your are looking for https://developer.mozilla.org/en-US/docs/Web/CSS/white-space or those cited at the end ?

    Thursday, July 4, 2019 10:42 AM
  • User288213138 posted

    Hi jsshivalik,

    Wrap column text

    Do you want to word-wrap the column text or just wrap the column text?

    if you want to word-wrap,you can set td css directly.

    The code:

    <style>
            td {
                word-break:break-all;
            }
        </style>
    <table border="1">
    <tr>
    <td>
    longwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongword
    </td>
    <td>
    longwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongword
    </td>
    <td>
    longwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongword
    </td>
    </tr>
    <tr>
    <td>
    longwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongword
    </td>
    <td>
    longwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongword
    </td>
    <td>
    longwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongword
    </td>
    </tr>
    <tr>
    <td>
    longwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongword
    </td>
    <td>
    longwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongword
    </td>
    <td>
    longwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongwordlongword
    </td>
    </tr>
    </table>

    The result:

    Best regatds,

    Best regards,

    Sam

    Friday, July 5, 2019 3:28 AM