cell overflow problem
cell overflow problem
miked
Posts: 43Questions: 3Answers: 0
we use datatables to dump out long urls, and in some cases they overflow the cell causing the table to expand in an unwanted fashion. link to a screenshot showing the problem - > http://imagebin.org/231053
any suggestions on how to fix this so that the url stays within the confines of the cell and doesn't expand the width?
thx
any suggestions on how to fix this so that the url stays within the confines of the cell and doesn't expand the width?
thx
This discussion has been closed.
Replies
http://www.datatables.net/forums/discussion/1316/bug-in-swidth-handling/p1
No it applies the width that you set on the column to a temporary table that DataTables will create to get the required widths for the cells. This is done because the browser 999 times out of 1000 will modify the width that you set for one reason or another. In your screenshot for example the text simply can't be made any smaller (the third line of the first Url cell is forcing the width).
How about enabling x-scrolling in DataTables using sScrollX ?
Allan
[code]
{ "sClass": "url"}
[/code]
and then within the page view add a style definition for url
[code]
.url {
max-width: 170px;
word-wrap: break-word;
}
[/code]