Web Global Net Web Application & Web Development Project Center

Technical Issues => CSS Related => Topic started by: admin on June 15, 2018, 01:44: AM



Title: word wrapping in the table cell <td>
Post by: admin on June 15, 2018, 01:44: AM
<style type="text/css">
table {
  table-layout: fixed;
  width: 100%
}

 td {

    /* css-3 */
    white-space: -o-pre-wrap;
    word-wrap: break-word;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
}
</style>

or try this

<table style="table-layout: fixed; width: 100%">
<td style=" white-space: -o-pre-wrap;
    word-wrap: break-word;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap; ">

<?php echo $row_rsnotes['note']; ?>

</td>
</table>

White space is the trick here