Column Stretching

Column Stretching

leonta2010leonta2010 Posts: 2Questions: 0Answers: 0
edited February 2012 in FixedHeader
Hi,
One of my column has a long text and is stretching my column. How can i force it to wrap?
thank You
leon

Replies

  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    You could set the width of the column using sWidth, or put a
    tag in the header. Do you have white-space: nowrap in your CSS for the header, that would cause it as well.

    Allan
  • leonta2010leonta2010 Posts: 2Questions: 0Answers: 0
    thanks Allen...my data cell is causing the problem. One of my data cell has 80 chars long.

    would this method work in data cell too?

    leon
  • allanallan Posts: 63,489Questions: 1Answers: 10,470 Site admin
    Hi Leon,

    You could use a
    tag to force a break, or you could wrap the content of the cell in a DIV element at use the text-overflow: ellipsis option of CSS3. Equally there are a number of ellipsis options either for Javascript and DataTables on the server-side. This post, and the posts link to from it, might be of some interest in that area: http://www.datatables.net/forums/discussion/1711/wrap-text-on-any-character/p1 (there are other posts on ellipsis as well, just search the forum :-) ).

    Allan
This discussion has been closed.