Title: Custom css not working for table width
Last modified: May 14, 2017

---

# Custom css not working for table width

 *  Resolved [wordinvestor](https://wordpress.org/support/users/wordinvestor/)
 * (@wordinvestor)
 * [9 years ago](https://wordpress.org/support/topic/custom-css-not-working-for-table-width/)
 * Hello TobiasBg,
    I read many support tickets about column width. I tried many
   solutions but still custom width is not working. Please tell me how can i fix
   column width because one column contain button i made with ultimate short code
   plugin. It need to be in one line but it is in 2 rows.
 *     ```
       .tablepress-id-1 .column-5 {
       	width: 190px !important;
       }
   
       .tablepress-id-1 .column-2 {
       	width: 100px;
       }
   
       .tablepress-id-1 .column-3 {
       	width: 100px;
       }
   
       .tablepress-id-1 .column-4 {
       	width: 100px;
       }
   
       .tablepress-id-1 .column-1 {
       	width: 150px;
       }
       ```
   
 * ![table](https://i0.wp.com/i.imgur.com/JUELgZW.png)
    -  This topic was modified 9 years ago by [wordinvestor](https://wordpress.org/support/users/wordinvestor/).

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

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years ago](https://wordpress.org/support/topic/custom-css-not-working-for-table-width/#post-9130524)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Instead of changing the column widths, you should simply disallow automatic line
   breaks here, by adding e.g. this:
 *     ```
       .tablepress-id-1 .column-5 {
         white-space: nowrap;
       }
       ```
   
 * Regards,
    Tobias
 *  Thread Starter [wordinvestor](https://wordpress.org/support/users/wordinvestor/)
 * (@wordinvestor)
 * [9 years ago](https://wordpress.org/support/topic/custom-css-not-working-for-table-width/#post-9130707)
 * Thank you very much Tobias.
    Yes your suggested code resolved my problem. And
   also thank you very much for fast reply. Best Regards
 *  Thread Starter [wordinvestor](https://wordpress.org/support/users/wordinvestor/)
 * (@wordinvestor)
 * [9 years ago](https://wordpress.org/support/topic/custom-css-not-working-for-table-width/#post-9130715)
 * And one suggestion if you can add check box option to display vertical line border
   between columns.
 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [9 years ago](https://wordpress.org/support/topic/custom-css-not-working-for-table-width/#post-9130719)
 * Hi,
 * no problem, you are very welcome! 🙂 Good to hear that this helped!
 * Adding a checkbox for such a vertical border is not something that I’m planning.
   It will only make the user interface much more complicated, because I would then
   have to add buttons for other styling options as well. I think it’s easier to
   use CSS code for this as well, like
 *     ```
       .tablepress-id-1 thead th,
       .tablepress-id-1 tbody td {
         border: 1px solid #cccccc;
       }
       ```
   
 * Best wishes,
    Tobias
 * P.S.: In case you haven’t, please [rate TablePress](https://wordpress.org/support/plugin/tablepress/reviews/)
   here in the plugin directory. Thanks!

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

The topic ‘Custom css not working for table width’ is closed to new replies.

 * ![](https://ps.w.org/tablepress/assets/icon.svg?rev=3192944)
 * [TablePress - Tables in WordPress made easy](https://wordpress.org/plugins/tablepress/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tablepress/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tablepress/)
 * [Active Topics](https://wordpress.org/support/plugin/tablepress/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tablepress/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tablepress/reviews/)

## Tags

 * [table width](https://wordpress.org/support/topic-tag/table-width/)

 * 4 replies
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [9 years ago](https://wordpress.org/support/topic/custom-css-not-working-for-table-width/#post-9130719)
 * Status: resolved