Long string without space

Long string without space

cmanskycmansky Posts: 9Questions: 4Answers: 0

Dear all,
Is any function can split the Long string without space to multiple line, or how to handle these string? As it affects the table auto size.

In my case, the username field is too long and cause this problem, if I remove the field, the table resize is good, the table must be in the frame and without any break.

Answers

  • cmanskycmansky Posts: 9Questions: 4Answers: 0

    I found the solution work for me

    .wrapword {
    white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 /
    white-space: -webkit-pre-wrap; /
    Chrome & Safari /
    white-space: -pre-wrap; /
    Opera 4-6 /
    white-space: -o-pre-wrap; /
    Opera 7 /
    white-space: pre-wrap; /
    CSS3 /
    word-wrap: break-word; /
    Internet Explorer 5.5+ */
    word-break: break-all;
    white-space: normal;
    }
    try to add these style to your style sheet and add the class to the related <td>

    ref: https://stackoverflow.com/questions/3247358/how-do-i-wrap-text-with-no-whitespace-inside-a-td

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Perfect - thanks for posting your solution.

    Allan

Sign In or Register to comment.