brem13 Posted August 12, 2010 Share Posted August 12, 2010 hey, i'm calling some text back from a database and i noticed a problem. If someone puts a lot of characters in a row ie(xxxxxxxxxxxxxxxxxfkljsadjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjlassssssssssssssssssssssaaaaaaaaaaaaaaaaaaalllllllllllllllllllll), its causing the table cell to get longer and longer and longer. is there some code that will make it do a line break so it doesnt make my 500px wide table cell 15000px long?? anyone understand what im sorta saying? Quote Link to comment Share on other sites More sharing options...
Wolphie Posted August 12, 2010 Share Posted August 12, 2010 Add a class to the cell and use this CSS: td.cell { max-width: 100px; word-wrap: break-word; } You can make the cell width any value you like. Quote Link to comment Share on other sites More sharing options...
Festy Posted August 13, 2010 Share Posted August 13, 2010 or just break the long string using 'nl2br' function. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.