Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Continuous string not getting wrapped in td

When I put a long continuous string in my fixed width td, it is not getting wrapped. The string increases the width of my table. Can anybody please help me with this.

For example:

this is my text --- works fine as in td width is fixed only height increases but if I insert
thisismytext --- then it increases the width of my table.

like image 599
Shruti Avatar asked Dec 08 '22 06:12

Shruti


1 Answers

you have to use

word-break: break-all

for the td

<style>
   .BreakWord { word-break: break-all; }
</style>

<td class="BreakWord">longtextwithoutspace</td>
like image 163
rahul Avatar answered Dec 28 '22 00:12

rahul