Force line to wrap in table

Giganews Newsgroups
Subject: Force line to wrap in table
Posted by:  Andrew Poulos (ap_pr…@hotmail.com)
Date: Sun, 06 Jul 2014

I have some HTML like this

<div id="main">
  <table class="tbl_features">
    <tr>
      <td>
        <ul>
          <li>Looong line here</li>
        </ul>
      </td>
    </tr>
  </table>
</div>

and the relevant CSS is like this

#main {
  margin-left:4em;
}
..tbl_features {
  border-collapse:collapse;
}

I need the list item to wrap despite there being a very long "unbroken"
string. That is, the table should be fully contained within the view
port. Instead the table width gets increased to accommodate, with the
browser showing a horizontal scroll bar.

I tried setting
  word-wrap: break-word;
and
  overflow-wrap: break-word;

Andrew Poulos

Replies