Fixed column width and no linebreak
Fixed column width and no linebreak
Hi there,
I tryed to build an datatable where the columns have a fixed width and stay at these width even if the content is longer (longer content should be displayed in a tooltip). So I've tried a lot of combinations with bAutoWidth, {"width" = "XXpx"}, $(id td).css(width, XX), set in table definition in html, changing width of the td with .each() or .live(mouseover, ...) and so on but nothing did the job ... the columns resize if the content is longer as the pixels I assined to the column or do a linebreak if there are blanks in the string - this isn't intended either, the rows should be one line high. Overflow would be hidden of course ;)
Does anyone know how to solve this problem?
Thanks in advance Tol
I tryed to build an datatable where the columns have a fixed width and stay at these width even if the content is longer (longer content should be displayed in a tooltip). So I've tried a lot of combinations with bAutoWidth, {"width" = "XXpx"}, $(id td).css(width, XX), set in table definition in html, changing width of the td with .each() or .live(mouseover, ...) and so on but nothing did the job ... the columns resize if the content is longer as the pixels I assined to the column or do a linebreak if there are blanks in the string - this isn't intended either, the rows should be one line high. Overflow would be hidden of course ;)
Does anyone know how to solve this problem?
Thanks in advance Tol
This discussion has been closed.
Replies
http://tpgblog.com/threedots/
Does that help? Either that or there are a few discussions on this forum about ellipsis as manentia suggests.
Allan
[/quote]
With one change, this worked perfectly for me, thanks!
[code]th, td { white-space: nowrap; overflow: hidden; };[/code]
(removed the "-" in "no-wrap"