Jump to content

word wrap question


Darkmatter5

Recommended Posts

Say I have a cell in a table that has more characters then the column width can accommodate and it wraps the text making the row two lines in length instead of just one. How can I turn off that word wrap and maybe even add a comment to the cell that if you hover your cursor over the text it'll show a little box with the cells full contents, but still preserves the single line row look?

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/110625-word-wrap-question/
Share on other sites

interesting...i had to wrap it in a block level element to make it work:

 

<style type="text/css">
  .narrow td {
    width: 100px;
  }
  .narrow td p {
    overflow: hidden;
    white-space: nowrap;
  }
</style>
<table class="narrow" border="1">
  <tr>
    <td><p>This is short</p></td>
    <td><p>This is much much longer and will get cut off</span></td>
  </tr>
</table>

Link to comment
https://forums.phpfreaks.com/topic/110625-word-wrap-question/#findComment-567726
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.