shorten td with overflow:hidden not possible?
shorten td with overflow:hidden not possible?
Hi,
I´m often having longer contents inside some td. Usually I cut that with css overflow:hidden, so that my td allways has the desired width.
When the datatable ist rendered the overflow doesn´t affect the td.
I also tried to get it with scripting like
[code]
"fnInitComplete": function() {
$('#example td').css({"overflow":"hidden"});
}
[/code]
with no effect...
Is there a way to use overflow:hidden on datatables td and how?
Achlan.
I´m often having longer contents inside some td. Usually I cut that with css overflow:hidden, so that my td allways has the desired width.
When the datatable ist rendered the overflow doesn´t affect the td.
I also tried to get it with scripting like
[code]
"fnInitComplete": function() {
$('#example td').css({"overflow":"hidden"});
}
[/code]
with no effect...
Is there a way to use overflow:hidden on datatables td and how?
Achlan.
This discussion has been closed.
Replies
Given that the TD element is display:table-cell, rather than display:block I'm not sure how the overflow will effect it - referring to the specs would probably tell us.
There has been some discussion about using ellipsis with DataTables:
http://datatables.net/forums/comments.php?DiscussionID=208
http://datatables.net/forums/comments.php?DiscussionID=30
http://datatables.net/forums/comments.php?DiscussionID=132
Beyond that, perhaps asking in an HTML help forum might yield a better answer :-)
Regards,
Allan
omg, I thougt it´s some specific problems with css overflow and some datatables functionality, sry.
So it´s just html/css... ;-)
My first solution is simply placing a div inside the td with css white-space:nowrap and overflow:hidden...
This will fix it till I´ll find a better way.
Thank you!
Regards,
Achlan.