how to shrink the width between columns in the data tables

how to shrink the width between columns in the data tables

timetimetimetime Posts: 5Questions: 0Answers: 0
edited May 2013 in DataTables 1.9
Hi alan.

Thanks for a beautiful plugin, i would like to have a question, how can i alter the width between columns i.e for eg i have two columns places and Hotel & restaurant. in this case i would like to have more gap for places. How is this possible?
now the datatables take the space based on the string length. lets say i get a place name like " xyzxyzcyz fsafsf asfsf safsfsaf " in this case it will come to new line, i don't want that to happen, how to control the gap between column width. I'm using jquery theme CSS.

Replies

  • allanallan Posts: 63,383Questions: 1Answers: 10,449 Site admin
    If you want to be certain it won't go to a new line, you could use `td { white-space: nowrap; }` in your CSS. Otherwise the sWidth option might help or set a width on the column's HTML.

    Allan
  • timetimetimetime Posts: 5Questions: 0Answers: 0
    Hi alen, thanks for the reply. i tried swidth and setting the width in HTML, its not working. i have set jquery flag set to true, why it will not consider swidth parameter even i manually gave width in html its not taking. is it because i use jquery theme flag set to true?
  • timetimetimetime Posts: 5Questions: 0Answers: 0
    Hi Alen, it worked
    Thanks lot
  • allanallan Posts: 63,383Questions: 1Answers: 10,449 Site admin
    Good stuff

    Allan
This discussion has been closed.