Title: Width column auto
Last modified: November 6, 2021

---

# Width column auto

 *  Resolved [aralize](https://wordpress.org/support/users/aralize/)
 * (@aralize)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/width-column-auto/)
 * Hello,
 * I wish the text was only on one line. However, the width of the columns appears
   to be fixed and does not adjust to its content.
    I tested options like autowitdh(
   in advanced options) or width: auto (in CSS), but it doesn’t work.
 * My problem is in the “Titre” column: [https://testbrick2.000webhostapp.com/2021/11/elementor-22](https://testbrick2.000webhostapp.com/2021/11/elementor-22)
 * Thank you in advance, once again …

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/width-column-auto/#post-15044015)
 * Hi Aralize,
 * I see that you added a custom columnDefs option to your publication. That options
   overwrites the default columnDefs added by the plugin. The plugin default columnDefs
   contains a className for each column specifically which allow you add your own
   CSS. My advice would be to remove your columnDefs, use the default and overwrite
   the CSS per column as needed.
 * You can still center your text with just one selected like:
 *     ```
       #BDD2 th, #BDD2 td {
       	text-align: center;
       }
       ```
   
 * And you can remove the column wrapping for column Titre like:
 *     ```
       #BDD2 th.Titre, #BDD2 td.Titre {
       	white-space: nowrap;
       }
       ```
   
 * Please let me know if this helps,
    Peter
 *  Thread Starter [aralize](https://wordpress.org/support/users/aralize/)
 * (@aralize)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/width-column-auto/#post-15044090)
 * Hi Peter,
 * Perfect, it works! Thank you so much !
 * I replaced “#BDD2” with “table.wpda-datatable” so that the property applies for
   all tables (which will be similar).
 * Good day.
 *  Thread Starter [aralize](https://wordpress.org/support/users/aralize/)
 * (@aralize)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/width-column-auto/#post-15044600)
 * Hi again,
 * However, by removing “ColumnDef” I can no longer prohibit sorting on the first
   column.
 * I have tried adding the following CSS code to hide the images from the cursors:
   
   table.wpda-datatable th.IMG.sorting_asc { background-image:none; }
 * table.wpda-datatable th.IMG.sorting_desc {
    background-image:none; } But the 
   images appear again if I click on another column to sort …
 * Thanks.
 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/width-column-auto/#post-15045840)
 * Hi Aralize,
 * Please use the following option to completely remove ordering:
    `{ "ordering":
   false }`
 * Best regards,
    Peter
 *  Thread Starter [aralize](https://wordpress.org/support/users/aralize/)
 * (@aralize)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/width-column-auto/#post-15046658)
 * Hi Peter,
 * I need to remove the sorting only on the first column, not on the other columns.
   
   This function will remove the sorting on all the columns.
 * Thanks.
    Best regards.
 *  Plugin Author [Passionate Programmer Peter](https://wordpress.org/support/users/peterschulznl/)
 * (@peterschulznl)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/width-column-auto/#post-15047121)
 * Hi Aralize,
 * Sorry, I thought you wanted to disble ordering on all columns. You can use the
   columns option to disable ordering on specific columns like this:
    `{ "columns":[{"
   targets":0,"orderable":false},{"targets":1,"orderable":true}] }`
 * I think you have to enable/disable ordering for each column specifically, so 
   you might have to add some more elements to your columns array.
 * Best regards,
    Peter
 *  Thread Starter [aralize](https://wordpress.org/support/users/aralize/)
 * (@aralize)
 * [4 years, 6 months ago](https://wordpress.org/support/topic/width-column-auto/#post-15048723)
 * Hi Peter,
 * With these options it works, I put “orderable: true” for each column individually.
 * Thanks a lot for your help !
 * Best regards,
    Aralize.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Width column auto’ is closed to new replies.

 * ![](https://ps.w.org/wp-data-access/assets/icon-256x256.png?rev=3299063)
 * [WP Data Access – App Builder for Tables, Forms, Charts, Maps & Dashboards](https://wordpress.org/plugins/wp-data-access/)
 * [Support Threads](https://wordpress.org/support/plugin/wp-data-access/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-data-access/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-data-access/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-data-access/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [aralize](https://wordpress.org/support/users/aralize/)
 * Last activity: [4 years, 6 months ago](https://wordpress.org/support/topic/width-column-auto/#post-15048723)
 * Status: resolved