Title: Fixed Column Width
Last modified: November 7, 2019

---

# Fixed Column Width

 *  Resolved [ianhooper1984](https://wordpress.org/support/users/ianhooper1984/)
 * (@ianhooper1984)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fixed-column-width-5/)
 * Hi,
 * I am having trouble setting column width so that the titles in the header are
   on one line instead of two or three.
 * I have unchecked ‘Use DataTables’, set the responsive mode to ‘scroll’ and used
   the below code to set the column widths.
 * .tablepress-id-1 .column-2,
    .tablepress-id-1 .column-3, .tablepress-id-1 .column-
   4, .tablepress-id-1 .column-5, .tablepress-id-1 .column-6, .tablepress-id-1 .
   column-7, .tablepress-id-1 .column-8, .tablepress-id-1 .column-9, .tablepress-
   id-1 .column-10, .tablepress-id-1 .column-11, .tablepress-id-1 .column-12, .tablepress-
   id-1 .column-13, .tablepress-id-1 .column-14, .tablepress-id-1 .column-15, .tablepress-
   id-1 .column-16, .tablepress-id-1 .column-17 { width: 150px !important; }
 * However, this does not have an effect and the table still seem constrained to
   the container instead of scrolling.
 * Thanks in advance.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffixed-column-width-5%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * (@tobiasbg)
 * [6 years, 6 months ago](https://wordpress.org/support/topic/fixed-column-width-5/#post-12108485)
 * Hi,
 * thanks for your post, and sorry for the trouble.
 * Instead of fiddling with column widths (which often does not work, due to how
   browser apply widths), I suggest that we then simply disallow automatic line 
   breaks in the table header row. For that, please add this to the “Custom CSS”
   textarea on the “Plugin Options” screen of TablePress:
 *     ```
       .tablepress-id-1 thead th {
         white-space: nowrap;
       }
       ```
   
 * Regards,
    Tobias

Viewing 1 replies (of 1 total)

The topic ‘Fixed Column 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/)

 * 1 reply
 * 2 participants
 * Last reply from: [Tobias Bäthge](https://wordpress.org/support/users/tobiasbg/)
 * Last activity: [6 years, 6 months ago](https://wordpress.org/support/topic/fixed-column-width-5/#post-12108485)
 * Status: resolved