How to Word-wrap in an HTML table?

Hi,

I have HTML table in a web application. When long word grows it does not wordwraps.

How to Word-wrap in an HTML table?

Thanks

View Answers

April 26, 2017 at 4:38 PM

Hi,

You may try this code:

<style>
td {
  border: 1px solid gold;
}
</style>

<table style="table-layout: fixed; width: 100%">
  <tr>
    <td style="word-wrap: break-word">
      LongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongWord
    </td>
  </tr>
</table>

Thanks









Related Tutorials/Questions & Answers:
Advertisements