html - table data going outside borders -


briefly , got

<div id="tablewrapper"> <table> <tr> <td>veryveryveryveryveryeryveryveryveryveryveryveryveryveryvery longtext</td> </tr> <table> </div> 

and long text going outside table,div , wrapper borders. looking this

textextexttextextexttextextext(border)|(border)textextexttextextexttextextext

what css rules should use displey in next line like:

texttexttexttexttexttexttexttexttext(border)
texttexttexttexttexttexttex

have tried setting display or width.

use table-layout: fixed; attribute (be sure give table width too, e.g. 100%) on table along applying word-wrap:break-word td's.

here's jsfiddle.


css:

table {   table-layout: fixed;    width: 100% }  td {   word-wrap: break-word; } 

Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -